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
What is the difference between the get method () and post method ()?
What are the different types of validation controls provided in ASP.NET?
in which protocol ASP.NET WEB API Work?
Please brief not about xsd,xslt & xml?
What is a 401 redirect?
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?
Who is using asp.net?
Explain difference between dataset and recordset?
Are cookies client side or server side?
Which asp.net objects encapsulate the state of the client and the browser?
Why do we need a web application session?
Can I combine classic asp and asp.net pages?
What is session and cookies in asp.net?
In order to get assembly info which namespace we should import?