Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi How to get session value in html page ? i need to get session value in html page using javascript or jquery.

In aspx page i add value in session in following code

VB
Session("fCSearch") = contentSearchStr.Trim


The above session value how to get in html page.


Note:Need to get value in html page ,not in aspx page

Regards
Aravind
Posted
Comments
/\jmot 5-Feb-15 6:14am    
1st thing.
how did you store the session variable in html page??
Aravindba 5-Feb-15 23:10pm    
no ,in aspx page i store session value ,so when i open html page need to get that value in html page.
/\jmot 6-Feb-15 0:30am    
so, you can pass the session value from aspx page to html page through querystring or something else like that.
and i don't think that there is any other way to access the session value in a html page.

1 solution

You cannot access Server Session Value in a HTML Page as HTML Pages are not processed by Server. Better to use aspx Pages.

Otherwise, if you are navigating from a aspx page to a HTML Page, then try to send the Session Value in some way by encrypting in query string or storing in a cookie and fetching it like that. But this is not a good approach.
 
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