473,382 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

UserControls, Properties and the ViewState

Hi,

To make my usercontrol remember the values i set in its public
properties across postbacks, do i need to explicity write code in the
getters and setters to enter the data into the viewstate?

I'm hoping there's some decoration (or something else) i can apply to
the properties to make their values be persisted automatically?

Thanks for any advice

Andrew
Feb 19 '08 #1
0 769

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hendrik W. Hansen | last post by:
I'm working on a WebForm, that through some tabs can load and contain a number of different "plugin" UserControls, all derived from the same "plugin" super class - a bit like the IBuySpy portal. ...
1
by: Santa | last post by:
I'm creating a webform this winter, and using multiple usercontrols on the page. Each of these controls has a textbox and button. When page gets postedback the button I clicked event handler...
2
by: Lau Lei Cheong | last post by:
Hello, I'm writing UserControls as stated earlier. Now I come to the problem that I need to preserve viewstate in my controls. If I want to save the informations on the controls, in which...
0
by: ujjc001 | last post by:
Here's the layout. Aspx has a repeater on the left, which will call a function to change a session var that holds the usercontrol name to add (i.e. "uc_myusercontrol.ascx") and then calls...
1
by: Christophe Peillet | last post by:
I have a CompositeControl with two types of properties: 1.) Mapped Properties that map directly to a child control's properties (ex.: this.TextboxText = m_txt.Text). These properties are handled...
0
by: seigo | last post by:
Hello, I faced with the following problem. I have a PlaceHolder on a page and a few UserControls which have custom events, for instance: public delegate void SelectHandler(object sender,...
4
by: Nathan Sokalski | last post by:
In several of my UserControls I add properties. If I access these properties in the CodeBehind of the pages that use the controls, I recieve an error when compiling. The reason for this is because...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
3
by: shapper | last post by:
Hello, I would like some confirmation on events. Should controls be added to page or to their parent controls in Page.Load event wrapped by "If Not PostBack"? And in which event should the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.