Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey

i am using couple of update panels in a complex dashboard...
Now my update panel updated a list of users (who's online who's offline) in every 5 seconds, on the firebug trace i found the update panel sending 30KB of request and response.

When traced further i found that its attaching all the viewstates with it in both request and response body.

This behavior doesn’t happen if we use raw ajax via jquery.
I found via googling that its a dirty secret of ASP.NET Update Panel transmits all other data and viewstates in its callback..

Any ideas to get rid of the viewstates ?????

Thanks
Posted

If you don't want to use viewstate turn it off. Either using a page directive

<@page EnableViewState="false" ...>


or on the control(s)

<asp:updatepanel enableviewstate="false" ...>


Keep in mind though disabling viewstate has ramifications also, such as the state of controls not being maintained, like list selection, checkbox status.="
 
Share this answer
 
v2
Comments
saxenaabhi6 4-May-11 21:53pm    
na na i want to use them for other purposes... i just want some way to override the update panel call and remove unnesessary data going with it...
moreover disabling viewstate on update panel dosent make much diff.. its all other data and viewstates of the page that goes with the call back
ok

this is an article of help

update panel can be evil sometimes


in my scenario i can't do much of my problem, except looking for other stuffs in my page to optimize it or use raw ajax in place of update panel
 
Share this answer
 
Comments
[no name] 4-May-11 22:07pm    
It is rather unseemly to add a solution to your own question and select it as the answer
saxenaabhi6 4-May-11 22:09pm    
thats by mistake, didn't mean to..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900