Is it possible to get the value of previous page view state value in current page?
-
Hi all, Can u tell me Is it possible to get the value of previous page view state value in current page? eg page1 viewstate["Name"]="Akash" response.redirect("page2.aspx") so in Page2 how can i get the value of viewstate["Name"]? is it possible? if so how? Thanks and Regards Lijo
-
Hi all, Can u tell me Is it possible to get the value of previous page view state value in current page? eg page1 viewstate["Name"]="Akash" response.redirect("page2.aspx") so in Page2 how can i get the value of viewstate["Name"]? is it possible? if so how? Thanks and Regards Lijo
Hi, ViewState is limited to postbacks for single page only. You can not access value of viewstate of one page from another. Use session instead. HTH.
Coding C# www.excitetemplate.com
-
Hi all, Can u tell me Is it possible to get the value of previous page view state value in current page? eg page1 viewstate["Name"]="Akash" response.redirect("page2.aspx") so in Page2 how can i get the value of viewstate["Name"]? is it possible? if so how? Thanks and Regards Lijo
You might start by reading a basic book, so you have some sort of clue about what you're doing. You have two options: 1 - you can do a cross page postback, where page 1 sets up page 2 to see it's viewstate. This is an ugly hack 2 - you can take your two pages, turn them into controls, show them on the same page, and then they will share viewstate b/c they are the same page.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.