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

What are the server controls in asp.net?

951


What are server objects?

926


A Web Service Can Only Be Written In .net. Is it True??

1054


Explain how is the asp.net mvc architecture different from others? : asp.net mvc

1014


Explain the page lifecycle of an asp.net mvc? : asp.net mvc

873


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

1015


Explain the use of errorprovider control in .net?

963


Can we override the enablepartialrendering property of the scriptmanager class?

1120


What is the function used for removing an event listener?

1022


What is GAC in ASP.NET 2.0

1155


Is asp.net web forms dead?

1112


What threading model used in asp and asp.net?

1060


Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?

2152


What do you mean by caching in asp.net?

1020


From which base class all web forms are inherited?

974