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 part of url?

919


What is difference between cache and session?

909


What are the events in a page life cycle?

899


What is full form of asp.net?

949


Why asp.net is used?

976


How is a session stored and maintained in asp.net?

945


Which data type does the rangevalidator control support?

898


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

1131


Is sql backend or frontend?

960


What is a global postback url?

896


What are the different method of navigation in asp.net?

979


Which is better session or viewstate?

902


What are query strings used for?

892


Describe the method to create a permanent cookie?

1034


What is the difference between system.stringbuilder and system.string

709