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
1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
What are web server controls in asp.net?
Do I need to have the latest version of windows media player installed?
What are the advantages of using Master Pages?
Can you explain one critical mapping? Performance issue which one is better?
Explain the concept of event bubbling in ASP.NET?
What are the event handlers that we can have in global.asax file?
List the advantages and disadvantages of user control an custom control?
What is the state management in asp.net?
How would you turn off cookies on a page of a website?
Which is faster union or union all?
How can I create master page in asp net?
What is a session in programming?
What is x xss protection?
Explain the working of passport authentication.