473,387 Members | 1,771 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,387 software developers and data experts.

How to know that viewstates a control save ? for example a DropDownList control.

xu
Thanks!
Nov 18 '05 #1
2 1188
Can u please rephrase that? Not sure if I got it right...

If you are loking for the option for the state on a dropdownlist to be stored on
viewstate then what you are looking for is the enableviewstate property. This is
a common property in webcontrols.

Joao Cardoso (MVP dotNET)
================================================== =====
[LusoCoders]- http://groups.yahoo.com/group/lusocoders/
[PontoNetPT]- http://www.programando.net/regras.aspx
jj***@acinet.pt.n.o-s.p-a.m - www.acinet.pt
================================================== =====
Nov 18 '05 #2
xu
I mean if the property of a control will be posted or persisted in ViewState
when i use it, the point isn't explained in the documents. If can i be aware
of it by testing only?

"Teemu Keiski" <jo****@aspalliance.com> дÈëÏûÏ¢ÐÂÎÅ
:O5**************@TK2MSFTNGP10.phx.gbl...
Hi,

general rule is that those properties that are posted by default by the
control, are not persisted in ViewState weheras those proeprties that can't be maintained without ViewState mechanism are again persisted through it.

TextBox's Text is an example of property that is posted automatically.
ViewState is used with it, but to detect if the value ahs been changed since last postback (which is informed by raising TextChanged event). Sae idea is with DropDownList, SelectedItem and SelectedIndexChanged event.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"xu" <sh*******@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP09.phx.gbl...
Thank your reply.

I want to know what properties of a control will be need to re-initialize
by
programmer,what properties of a control will be assigned by viewstates

or postback-date automatically when a page are postbacking.
"Joao S Cardoso [MVP]" <jj***@acinet.pt.n-o.s-p.a-m> дÈëÏûÏ¢ÐÂÎÅ
:0q********************************@4ax.com...
Can u please rephrase that? Not sure if I got it right...

If you are loking for the option for the state on a dropdownlist to be

stored on
viewstate then what you are looking for is the enableviewstate
property. This is
a common property in webcontrols.

Joao Cardoso (MVP dotNET)
================================================== =====
[LusoCoders]- http://groups.yahoo.com/group/lusocoders/
[PontoNetPT]- http://www.programando.net/regras.aspx
jj***@acinet.pt.n.o-s.p-a.m - www.acinet.pt
================================================== =====



Nov 18 '05 #3

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

Similar topics

4
by: huzz | last post by:
I am trying to access a DropDownList control inside a repeater using ItemCommand as shown below but for some reason i can't access the DropDownList. When i step through the debug i get <undefine...
5
by: TJS | last post by:
I need to add validation to drodownlist control but it sends back an error message that says: "System.Web.UI.WebControls.DropDownList' does not allow child controls" the code is : If...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
2
by: Pipo | last post by:
Nobody knows how to get the values provided in the client can be read in the user-control? If have made a Web Custom Control with 2 textboxes and 1 dropdownlist. The user fills in my control (the...
3
by: Joe | last post by:
Hello All, I am developing a webform which creates ArrayLists of people's names and addresses (the values are retrieved from an xml file) and dynamically drops a user control onto the webform...
2
by: glenn | last post by:
Hi folks, I am trying to determine which item in a DropDownList Web control has been selected. I have posted an OnSelectedIndexChanged subroutine in my code with a reference to the subroutine...
5
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
0
by: pabloazorin | last post by:
I developed a Date Picker web control using C# and .net framework 1.1 I added my control to Visual Studio 2003 IDE toolbar. When I drag and drop my control to design web page, the control renders...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview control with a template column that has a textbox and when the control is bound to the datasource the textbox is filled ok. I then change what is in the textbox in the gridview...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.