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 do you understand by aggregate dependency?
How to you can limit Access to Web API to Specific HTTP Verb?
How would you turn off cookies on a page of a website?
Is sql backend or frontend?
What are the disadvantages of asp.net?
How can we inherit a static member?
How to make sure that contents of an updatepanel update only when a partial postback takes place (and not on a full postback)?
Do session use cookies in asp net?
Where would you use an ihttpmodule, and what are the limitations of any?
How to create a db connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed if question not clear,let me know
Describe the difference between inline and code behind - which is best in?
What is a web api?
Difference between using directive vs using statement?
What is application in asp net?
Why Unload event of MasterPage Calls first in ASP.net ?