| Author: DotNetGuts (DNG) 01 Oct 2006 | Member Level: Diamond | Rating: Points: 2 |
ViewState maintains states between page postback, so it is not possible to travel one page value to another page with help of ViewState.
You can use Session, QueryString, etc... for this stuff
eg: In page1 Session["myTextValue"] = "Sona";
In Page2 if(Session["myTextValue"] != null) { text1.Text = Session["myTextValue"].ToString(); }
|
| Author: Gaurav Sharma 01 Oct 2006 | Member Level: Diamond | Rating: Points: 2 |
You can fetch the value of viewstate of previous page by using the Context Handlers for that u need to use the Server.Transfer() method
Thanks
|
| Author: Rajaraman 02 Oct 2006 | Member Level: Diamond | Rating: Points: 2 |
If you get two ways..
1. Use Session Variables 2. Use HTTPContext to get form value from any pages.
Example:
http://msdn2.microsoft.com/en-us/library/6c3yckfw.aspx http://www.odetocode.com/Articles/112.aspx http://www.codeproject.com/aspnet/URLRewriter.asp http://www.java2s.com/Code/ASP/Session-Cookie/HttpContextGetAppConfig.htm
Regards, Rajaraman. B.
--------------- Always Try to get Better Solutions...
|