Last post May 03, 2005 04:57 PM by stevenbey
May 02, 2005 10:25 AM|Just ice|LINK
May 02, 2005 11:26 AM|dinuj|LINK
May 03, 2005 07:43 AM|Just ice|LINK
May 03, 2005 11:52 AM|dinuj|LINK
May 03, 2005 01:02 PM|stevenbey|LINK
LoadPostData is used to update ViewState with changes made client-side, otherwise ViewState would always stay the same.
May 03, 2005 01:07 PM|Just ice|LINK
May 03, 2005 01:20 PM|dinuj|LINK
May 03, 2005 01:24 PM|stevenbey|LINK
Now I'm really comfused about who's doing what (ViewState vs. PostData) [:$] <div> </div> <div>EnableViewState = "true" make the control keep it's data, when data means only data that been bind/set to this control via server side ?
Think of it this way:
When a page is first requested ViewState contains the value for all of the Controls on the page. This information is sent to the client in a hidden form field.
If a user makes a change to the value in a control this is represented in PostData (remember the ViewState value is the old value)
ViewState is reinstated (i.e. the old value) and then we need to change it to the new value, that the client has input - this is the PostData.
May 03, 2005 01:31 PM|Just ice|LINK
May 03, 2005 02:50 PM|stevenbey|LINK
OK, I think I've got it [:D] <div> </div> <div>Just to make sure I understood:
</div> <div>So ViewState is good only for data that been bind/set from the server side,</div> <div>and we don't want to bind/set it after every postback,</div> <div>So we do it only once (if !IsPostBack), and because of the EnableViewState="true",</div> <div>It
will be displayed after every postback,
without making the bind (which may take long time) again .</div> <div> </div> <div>And it I want to keep th client data from postback to postback, I will to set the AutoPostBack="true"</div> <div> </div> <div>I've got it right ? [:)]
May 03, 2005 04:23 PM|Just ice|LINK
May 03, 2005 04:57 PM|stevenbey|LINK
So it will be currect to say that I will use EnableViewStat="true" for controls that I don't want to fill them with data <div>every postback, but only at the first time, and usually the client will not change this data in the client side?