Click here to Skip to main content
15,910,303 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I have a view page,I am able to retrieve the id value in the view page. I want to assign that value to the session. I assigned like
C#
'@Session["Id"]' = ID. 


but when i put alert(ID),the value is not getting.
can u you tell me how to set a session value in the view page
Posted
Updated 2-Aug-12 20:15pm
v3

1 solution

It should be like
C#
Session["Id"] = ID
...
NB: If you are getting null when you are using alert; that's not because of this statement.

Regards
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900