0

Hi,

I am using the trace facility to find the viewstate size of controls on postback. I have added a label , a textbox and a submit button to the webform. However after posting my page and viewing the trace.axd page I find that the viewstate size bytes and controlstate size bytes is 0 for all the controls. Can anyone explain why ?

Regards

Sanjish

2
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by SANJISH
0

>Can anyone explain why ?

ViewState stores every changed property. Initializing the control in the page (any event) counts as a change, so any changes in control property during page execution will be persisted in viewstate.

0

But shouldn't the viewstate size bytes in trace.axd show some value atleast instead of 0 everytime i post ?

Regards

Sanjish

1

Add following in click handler of button,

TextBox1.BackColor=System.Drawing.Color.Red;
Votes + Comments
Excellent explanation of the Query
0

Hi,
Thanks a lot for the explanation . It worked . However the control state size remains 0 . I am sure you can explain that also.

Thanks & regards

Sanjish

0

Thanks a lot for the links to control state . The articles have cleared my doubts about control state. Thanks once again

Regards

Sanjish

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.