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 is web configuration file and how to use in web application

1070


What is routing in MVC?

1079


Does asp.net still recognize the global.asa file?

1207


What are validator? How do you disable them?

1206


What are the different validators in asp.net?

1060


What is the use of web.config file?

1062


What threading model used in asp and asp.net?

1105


what is DLL Hell and how it is solved in .NET? please explain clearly??

2423


How you can access the properties and controls of master pages from content pages?

1008


What is custom attribute? How to create?

1131


What is server infrastructure & server components?

1265


What are the event handlers that we can have in global.asax file?

1015


What is the significance of ASP.NET routing?

1126


What are the memory-mapped files?

1060


How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.

5625