C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




pls help me


Posted Date: 01 Oct 2006      Total Responses: 3

Posted By: sonalli       Member Level: Gold     Points: 2


hi,

textbox1.text ="sona"

i want to the textbox value travel one page to another page using viewstate?what are properties i have to set?. how?

thx in advance

sonallllliiii




Responses

Author: DotNetGuts (DNG)    01 Oct 2006Member Level: DiamondRating:     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 2006Member Level: DiamondRating:     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 2006Member Level: DiamondRating:     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...






Post Reply
You must Sign In to post a response.
Next : How
Previous : Pre Selected Items in ListBox??
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use