How to transfer label value one page to another page in ASP .Net 2.0?

Showing Answers 1 - 6 of 6 Answers

hai

 By using Sessions u can transfor the values from one page to another page in asp.net

EX: session["a"]=label1.text  // write this in first page
  label1.text=session["a"]  // write in second page

hope this will be help full to u
 
additional information
 Not only label values u can pass even large ammount of data using sessions
EX:Dataset
 

  Was this answer useful?  Yes

SunilSRA

  • Jun 9th, 2008
 

Use Server.Redirect or Server.Transfer with Parameter.

        Server.Redirect("Test2.aspx?  &Value=" & label1.text )

In Test2.aspx,

         strValue= Request.QueryString("Value")

But we can pass only less amount of data. Like string data. It
should not exceed more than 256 characters.


When it is required that pass the Datasets, Datatables to another pages.

In that case better to use the Session Variables.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions