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
What is web configuration file and how to use in web application
What is routing in MVC?
Does asp.net still recognize the global.asa file?
What are validator? How do you disable them?
What are the different validators in asp.net?
What is the use of web.config file?
What threading model used in asp and asp.net?
what is DLL Hell and how it is solved in .NET? please explain clearly??
How you can access the properties and controls of master pages from content pages?
What is custom attribute? How to create?
What is server infrastructure & server components?
What are the event handlers that we can have in global.asax file?
What is the significance of ASP.NET routing?
What are the memory-mapped files?
How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.