如何在html页面中获取会话值? [英] How to get session value in html page ?
本文介绍了如何在html页面中获取会话值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi
如何在html页面中获取会话值?我需要使用javascript或jquery在html页面中获取会话值。
在aspx页面中,我在以下代码中添加会话值
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
Session("fCSearch") = contentSearchStr.Trim
以上会话值如何进入html页面。
注意:需要在html页面获取价值,而不是在aspx页面中获得价值
问候
Aravind
The above session value how to get in html page.
Note:Need to get value in html page ,not in aspx page
Regards
Aravind
推荐答案
您无法在HTML
页面中访问服务器会话值HTML
服务器不处理页面。最好使用aspx
页面。
否则,如果你从aspx导航
页面到HTML
页面,然后尝试通过加密查询字符串$以某种方式发送会话值c $ c>或存储在
cookie
中并像这样获取它。但这不是一个好方法。
You cannot access Server Session Value in aHTML
Page asHTML
Pages are not processed by Server. Better to useaspx
Pages.
Otherwise, if you are navigating from aaspx
page to aHTML
Page, then try to send the Session Value in some way by encrypting inquery string
or storing in acookie
and fetching it like that. But this is not a good approach.
这篇关于如何在html页面中获取会话值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文