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 part of url?
What is difference between cache and session?
What are the events in a page life cycle?
What is full form of asp.net?
Why asp.net is used?
How is a session stored and maintained in asp.net?
Which data type does the rangevalidator control support?
How to disable cut, copy and paste in TextBox using jQuery in asp.net?
Is sql backend or frontend?
What is a global postback url?
What are the different method of navigation in asp.net?
Which is better session or viewstate?
What are query strings used for?
Describe the method to create a permanent cookie?
What is the difference between system.stringbuilder and system.string