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 / 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


Please Help Members By Posting Answers For Below Questions

What is the difference between the get method () and post method ()?

1036


What are the different types of validation controls provided in ASP.NET?

1203


in which protocol ASP.NET WEB API Work?

1153


Please brief not about xsd,xslt & xml?

995


What is a 401 redirect?

992


Explain what is the procedure to create the environment for asp.net? : asp.net mvc

1075


Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?

1003


Who is using asp.net?

989


Explain difference between dataset and recordset?

1118


Are cookies client side or server side?

952


Which asp.net objects encapsulate the state of the client and the browser?

1150


Why do we need a web application session?

1036


Can I combine classic asp and asp.net pages?

1143


What is session and cookies in asp.net?

1055


In order to get assembly info which namespace we should import?

1049