How do you pass session values from one page to another ?
Answers were Sorted based on User's Feedback
Answer / pravesh chourasia
1.In first page set session variable. e.g.
Session ["Name"] = "Pravesh";
Here "Name" is name of session variable and "Pravesh" is
the value of session variable "Name".
2. In next page get the sesion variable. e.g.:-
string myName=Session["Name"].ToString();
| Is This Answer Correct ? | 98 Yes | 28 No |
Answer / hari
Get the value from Login Page where the Session Iniciated Like
Sesstion["UserID"]
and you may use this value on another page
Like
EnteredBy=Convert.Toint64(Session["UserID"])
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / vimal chauhan
response.redirect("requireform.aspx?"& txtbox1.text)
| Is This Answer Correct ? | 5 Yes | 15 No |
Answer / raja mohamed
request query:
response.redirect("requireform.aspx"?get=txtbox1.text);
requireform.aspx
txtbox2.text=get
server transfer:
dim my as string
m="value"
server.transfer("requireform.aspx"?get=m)
requireform:
dim t as string
t=page.request("m")
| Is This Answer Correct ? | 11 Yes | 34 No |
how to update data set?
I have to send data throug querystring from one page to another. But it should not be displayed in URL. How it is possible?
How would you create a permanent cookie?
How to consume a webservice in a windows application without adding through the web reference?
What is the difference between the response.write() and response.output.write() methods?
How many web.config files in each solution
How to check null values in dataset ?
Who creates jsessionid?
How can we update records in gridview?Is there any appropriate code for it?
What is the difference between ExecuteReader,ExecuteNonQuery and ExecuteScalar.
What is Bundling and Minification in MVC?
Is object a value type or referenced type?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)