i recommend you to go for some other state management techniques like Sessions.
Thanks Srikanth
But i am not using Viewstate seperately as a Session management..........its about each control has some automatic viewstate value.......in my case its Treeview which is causing larger value of viewsstate..... If i disable viewstate on Treeview then viewstate
size decreases considerably....but then treeview events are not working properly
Yes i did try to compress viewstate by seeing the link provided by Srikanth....... Its giving the following compilation error when applied in MasterPage, since Treeview is in masterpage (root cause of viewstate size)
CS0115:
'Master_Pages_StudyMaterial.LoadPageStateFromPersistenceMedium()': no suitable method found to override
When i applied that on content page it reduces the viewstate size to almost 40%.
Do i need to override these two methods in every page.... Thats a lot of work i guess, since my Treeview contains many links.
Before a year ago, I have same problem as you right now, What I did at that moment the is to maintain my state on server side, and sending plain html without state and having a key of state.
If you didn't found solution for your problem then let me know I can help you with some sample code, or a demo project that how you can maintain state on server side even in file, database, cache, session any where which can work with your application architecture
and you may change the state saving location by just changing key in webconfig.
i would like to know whether more improvements in Asp.net 4.0
I didn't see any major improvements in ASP.NET 4.0 except enabling viewstate for individual controls ! You can check the below link for improvements in ASP.NET 4.0.
rajesh sahar...
Member
225 Points
553 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 04:23 AM|LINK
Thanks Srikanth
But i am not using Viewstate seperately as a Session management..........its about each control has some automatic viewstate value.......in my case its Treeview which is causing larger value of viewsstate..... If i disable viewstate on Treeview then viewstate size decreases considerably....but then treeview events are not working properly
Srikanth Kas...
Contributor
4289 Points
883 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 04:46 AM|LINK
Ok. Try assigning/enabling the viewstate conditionally in the server side rather than in the client side by default. May be that will work.
Srikanth Kasturi
Please "Mark As Answer" if my post serves purpose.
nijhawan.sau...
All-Star
16398 Points
3172 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 05:04 AM|LINK
Did you try compressing your viewstate ?
Use GZipStream class available in System.IO.Compression and check once.
rajesh sahar...
Member
225 Points
553 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 07:37 AM|LINK
Yes i did try to compress viewstate by seeing the link provided by Srikanth....... Its giving the following compilation error when applied in MasterPage, since Treeview is in masterpage (root cause of viewstate size)
CS0115: 'Master_Pages_StudyMaterial.LoadPageStateFromPersistenceMedium()': no suitable method found to override
When i applied that on content page it reduces the viewstate size to almost 40%.
Do i need to override these two methods in every page.... Thats a lot of work i guess, since my Treeview contains many links.
Thanks
roopeshreddy
All-Star
20135 Points
3323 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 07:43 AM|LINK
Hi,
ASP.NET ViewState has both pro's and con's!
Check the below link to utilize the ViewState to improve performance of your application!
http://msdn.microsoft.com/en-us/magazine/cc163901.aspx
Hope it helps u...
Roopesh Reddy C
Roopesh's Space
rajesh sahar...
Member
225 Points
553 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 12:46 PM|LINK
This article is written regarding Asp.net 2.0 , i would like to know whether more improvements in Asp.net 4.0
The thing that some controls like Treeview, requires ViewState, to function properly is very annoying
Thanks
nijhawan.sau...
All-Star
16398 Points
3172 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 06:10 PM|LINK
Http is stateless, if you want to save state b/w postbacks, you got to use something!!
ammasbhatti
Member
124 Points
22 Posts
Re: will larger viewstate value reduces the page load time?
May 09, 2012 08:57 PM|LINK
Hi, Rajesh!
Before a year ago, I have same problem as you right now, What I did at that moment the is to maintain my state on server side, and sending plain html without state and having a key of state.
If you didn't found solution for your problem then let me know I can help you with some sample code, or a demo project that how you can maintain state on server side even in file, database, cache, session any where which can work with your application architecture and you may change the state saving location by just changing key in webconfig.
roopeshreddy
All-Star
20135 Points
3323 Posts
Re: will larger viewstate value reduces the page load time?
May 10, 2012 04:25 AM|LINK
Hi,
I didn't see any major improvements in ASP.NET 4.0 except enabling viewstate for individual controls ! You can check the below link for improvements in ASP.NET 4.0.
http://www.asp.net/whitepapers/aspnet4
Hope it helps u...
Roopesh Reddy C
Roopesh's Space