在viewstate中创建和存储控件对象 [英] Create and store a control object in viewstate

查看:77
本文介绍了在viewstate中创建和存储控件对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我正在页面上创建一些动态控件,这些控件可能是数百个控件.
根据页面的输入,其中一些将可用,因此您可以说可见性将有所不同.该页面实际上代表了数十个页面.
我想从viewstate创建这些页面,例如,我在page_Init()上创建了5个文本框,然后要将它们存储在Viewsate中,如果需要的话下次再从视图状态加载.
换句话说,我可以创建并将所有控件对象及其所有属性存储在viewstate中,如果可以的话,那么我将如何完成此操作.
非常感谢
问候
Basharat

Currently I am creating some dynamic controls on my page these can be hundreds of controls.
Some of these will be available depending upon the input of the page so you can say the visibility will be different. This page in fact represents the dozens of pages.
I want to create these pages from viewstate, e.g I have created 5 textboxes on page_Init() and then want to store these in Viewsate and next time if needed then load from the view state.
In the other words can I create the and store the whole control object with all of the properties in viewstate, if so then how I will be able to accomplish this.
Many Thanks
Regards
Basharat

推荐答案

很适合您.

初学者查看状态指南 [如何以视图状态存储对象? [
A good article for you.

Beginner''s Guide To View State [^]

How to store object in view state?[^]


这篇关于在viewstate中创建和存储控件对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆