can we transfer data from one page to another page using
viewstate if so how?if not y?
Answer Posted / kranthi
Yes it is possibel!!!!!!!!!!!!
in pag1.aspx
protected void Button1_Click(object sender, EventArgs e)
{
ViewState["name"] = txtTest.Text;
Server.Transfer("Default2.aspx");
}
In page2,aspx load event
protected void Page_Load(object sender, EventArgs e)
{
Page Poster = this.PreviousPage;
TextBox txtNewTest = (TextBox)Poster.FindControl
("txtTest");
string sDisplay = txtNewTest.Text.ToString();
Response.Write(sDisplay);
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How to find last error which occurred?
how to elimainte the similar data from the different tables
What is distributed system in asp.net?
Explain the concept of View Model in MVC?
What is the page life cycle in asp.net?
Is session server side or client side?
What is session and application variable in asp net?
How can I have a particular web page in an asp.net application which displays its own error page?
Where the viewstate is stored after the page postback?
What is cached data phone?
What is the difference between Classic ASP and ASP.Net?
What is the purpose of url encoding?
How can we access static variable?
What are the HTML server controls in ASP.NET?
Differentiate strong typing and weak typing