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

1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????

20773


What are web server controls in asp.net?

1043


Do I need to have the latest version of windows media player installed?

930


What are the advantages of using Master Pages?

981


Can you explain one critical mapping? Performance issue which one is better?

848


Explain the concept of event bubbling in ASP.NET?

1043


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

938


List the advantages and disadvantages of user control an custom control?

924


What is the state management in asp.net?

983


How would you turn off cookies on a page of a website?

870


Which is faster union or union all?

948


How can I create master page in asp net?

906


What is a session in programming?

1007


What is x xss protection?

939


Explain the working of passport authentication.

910