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
Can you change a Master Page dynamically at runtime?
What is the purpose of App_Code folder in ASP.NET? Why we this?
Can we have 2 web config files?
What is a session in programming?
What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
What is runat?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
Explain the role of global.asax?
What is meant by ispostback in asp net?
What is considered a service provider?
How many types of sessions in asp.net?
What are the HTML server controls in ASP.NET?
What are the contents of cookie?
What are validators and list some validators of asp.net?
What is the extension of master page in asp.net?