Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to find last error which occurred?

995


how to elimainte the similar data from the different tables

2130


What is distributed system in asp.net?

997


Explain the concept of View Model in MVC?

976


What is the page life cycle in asp.net?

940


Is session server side or client side?

922


What is session and application variable in asp net?

871


How can I have a particular web page in an asp.net application which displays its own error page?

1076


Where the viewstate is stored after the page postback?

1019


What is cached data phone?

997


What is the difference between Classic ASP and ASP.Net?

1056


What is the purpose of url encoding?

925


How can we access static variable?

1060


What are the HTML server controls in ASP.NET?

1059


Differentiate strong typing and weak typing

897