can we transfer data from one page to another page using
viewstate if so how?if not y?
Answer Posted / jack
TRY THIS it Will WORK
public void Button1_Click(object sender, EventArgs e)
{
ViewState["name"] = TextBox1.Text;
Context.Items.Add("variable", ViewState["name"].ToString());
Server.Transfer("Default2.aspx");
}
//next page
public void Page_Load(object sender, EventArgs e)
{
string myValue = Context.Items["variable"].ToString();
TextBox2.Text = myValue;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can we use Web API with ASP.NET Web Form?
What is difference between rest and soap?
Will session work if cookies is disabled?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com
How do you declare static variable?
To get the values in two different controls to match which control you use it?
What is the difference between page-level caching and fragment caching?
Differentiate between client-side and server-side validations in web pages.
Explain the difference between asp & asp.net.
Where session id is stored?
Why mvc is faster than asp.net? : Asp.Net MVC
Securitywise What are the Enhancements in 2.0?
What is preprocessor in .net and type, where it use?
How is a session stored and maintained in asp.net?
What is query string with example?