Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

i need to set the value of session variable in aspx page on select of drop down,
I am calling function on selection change of dropdown but how to set the session variable value in aspx page.



Please Reply.

Thanks In Advance
Posted

C#
Page.Session["YourVariableName"] = YourVariableValue;

You can find more info here[^]
 
Share this answer
 
In Selected index change put value in session variable.

C#
Session["Val"] = Dropdownlist1.Text;
 
Share this answer
 
Comments
kishore sharma 16-Nov-11 23:24pm    
Hi thanks for Reply,
I need to set session value from client side i dont want to go server side,
It means Can i set Session value using javascript.

Thanks

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