Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on xsl page.

HttpContext.Current.Session.Contents["USERID"]="Manager";

Now,
I want to access this value on other page using javascript on xsl page.
I went further in following manner:
var someSession = '<%= HttpContext.Current.Session["USERID"] %>';
alert(someSession );

But I am not getting the value of session....instead I am getting
<%=HttpContext.Current.Session["USERID"] %> in the alert box.

How can I approach further?
Posted

If you write the alert, this is a client side code, so I belive store that session value into a hidden control ( and then try accessing this value through name of hidden control, you should get that.
 
Share this answer
 
Comments
aks.shan 19-Feb-14 4:01am    
Hi Arindam,
That too doesn't work.
Had to use a hidden field variable on xsl page and then assign it value in code behind page from session by creating a xmlnode.
 
Share this answer
 

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