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 custom attribute?
What r the asp.net list controls and difference between them?
Explain the difference between asp & asp.net.
Can I stream live content/events?
What is a ashx file?
What is the difference between runtime version and version?
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
Why mvc is faster than asp.net? : Asp.Net MVC
What is full form of asp.net?
What is base class of button control in .net?
What is application variable in asp.net?
Explain a program using code nuggets to create a simple application? : asp.net mvc
there is two functions function a and function b like fun a(){.... ..... } fun b() { } in function b i write the coding to add two numbers and i need to dispaly the sum result in function a with out using global variable. how we do?
Can any body provide me the sample web application in asp.net
What is the difference between session object and application object?