Labels

Thursday, December 27, 2007

Addition to the ViewState Myth

This is in addition to the post on Viewstate Myth in Apr 2007

In my last post, I have described the Viewstate Myth on ‘Change Of Values’ in controls.

Today I’m posting the conclusion of viewstate myth on the Visibility and Enabling Disabling of controls.

After making research on above two forms below is the conclusion:



Visibility –

· All controls are dependent on Viewstate.

· So if the Viewstate is disabled, the controls will become visible again on 'SimplePostBack' operation.

Enable/Disable-

· All controls are dependent on Viewstate.

· So if the Viewstate is disabled, the controls will become enable again on 'SimplePostBack' operation.

Recap:

Changing Value –

· Textbox, HiddenField, Dropdown does not depend on ViewState.

· Label requires view state.

Thanks & Regards,

Arun Manglick || Tech Lead

No comments:

Post a Comment