Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to know that viewstates a control save ? for example a DropDownList control.

Reply
Thread Tools

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

 
 
xu
Guest
Posts: n/a
 
      11-21-2003
Thanks!


 
Reply With Quote
 
 
 
 
Joao S Cardoso [MVP]
Guest
Posts: n/a
 
      11-21-2003
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
http://www.velocityreviews.com/forums/(E-Mail Removed).n.o-s.p-a.m - www.acinet.pt
================================================== =====
 
Reply With Quote
 
 
 
 
xu
Guest
Posts: n/a
 
      11-24-2003
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]" <(E-Mail Removed)-o.s-p.a-m> 写入消息新闻
:(E-Mail Removed)...
> 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
> (E-Mail Removed).n.o-s.p-a.m - www.acinet.pt
> ================================================== =====



 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      11-24-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)-o.s-p.a-m> 写入消息新闻
> :(E-Mail Removed)...
> > 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
> > (E-Mail Removed).n.o-s.p-a.m - www.acinet.pt
> > ================================================== =====

>
>



 
Reply With Quote
 
xu
Guest
Posts: n/a
 
      11-25-2003
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" <(E-Mail Removed)> 写入消息新闻
:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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]" <(E-Mail Removed)-o.s-p.a-m> 写入消息新闻
> > :(E-Mail Removed)...
> > > 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
> > > (E-Mail Removed).n.o-s.p-a.m - www.acinet.pt
> > > ================================================== =====

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ViewStates, postBacks and form data Jason ASP .Net 2 02-11-2005 04:53 PM
'example.com' == 'example.com.' => false... is this intended? Sam Roberts Ruby 15 02-07-2005 04:36 PM
weird browser crash with viewstates mark ASP .Net 0 06-29-2004 09:49 AM
I know, I know, I don't know Andries Perl Misc 3 04-23-2004 02:17 AM
Javascript client-side post and keep viewstates? Bruce W.1 ASP .Net 3 02-01-2004 04:32 PM



Advertisments