quesrystring,cokies,session,webstorage
Interviews3 answers
How many ways are there for a page to pass something/data to another page?
3 Answers
Bidyasagar MishraPosted Jul 11, 2019, 9:13 PM EDT
Response.Redirect |
Cookies |
Application Variables |
HttpContext
Aniket RanaPosted Apr 3, 2018, 12:34 AM EDT
You can pass data from one page to another page through following way
1- Response.Redirect
SET: Response.Redirect("Defaultaspx?name=Tripat");
GET: string Name = Request.QueryString["name"];
2-Cookies
SET : HttpCookie cookName = new HttpCookie("Name");
cookName.Value = "Tripat";
GET :string name = Request.Cookies["Name"].Value;
3- Application Variables
SET : Application["Name"] = "Tripat";
GET :string name = Application["Name"].ToString();
Tripat Bala SinghPosted Feb 8, 2018, 11:34 PM EST



