Last post Jan 04, 2011 02:04 AM by ram.kvb
Dec 30, 2010 07:47 AM|ram.kvb|LINK
I have created a matser page with a two radio buttons, text box and a button. Whenever user sets some values to these control and clicks the button, i will navigating him from one content page to another based on the data he has entered. The problem is after
the content page load, the values selected/given in the controls(radio button, text box) are getting cleared.
Is there some way to maintain the values ?
Thanks in advance,
Dec 30, 2010 08:16 AM|grundebar|LINK
How are you moving from one content page to another? Response.Redirect, Server.Transfer, other? If you use a Response.Redirect or Server.Transfer there is no viewstate to load as the page lifecycle starts from scratch. See
here for more info.
Dec 30, 2010 08:16 AM|RichardY|LINK
In the container heirarchy it is Content Page -> Master Page. The master page is rendered as a part of the content page not the other way around. If you want to persist the state of controls you can use session or pass the info to the new page as query
Dec 30, 2010 12:32 PM|ram.kvb|LINK
Hi G, Thanks a lot for the reply... yes you are right am using Response.redirect method....
So i need to store the values in session.(as said by RichardY) or something to maintain it after content page load..f
Is there any other way of navigating to content page so that it maintains the values automatically ?
Dec 30, 2010 12:35 PM|ram.kvb|LINK
Thanks a lot Richard for your reply..
Dec 30, 2010 01:41 PM|grundebar|LINK
Not when it comes to Master Pages. Since the content on the master page isn't really a page, it becomes part of the content page, there is no way to propogate viewstate. ViewState is designed to be used on a single page. If you create a new ViewState object
and assign it some value, it will not be accessible on any other page.
Dec 30, 2010 09:34 PM|RichardY|LINK
No problem. Good luck.
Dec 31, 2010 01:07 AM|karang|LINK
Please check this tutorial
May be you can get some idea.
Jan 04, 2011 02:04 AM|ram.kvb|LINK
Thanks a lot G and Karan..