HTML档案中的工作阶段变数 [英] Session variable in html file

查看:76
本文介绍了HTML档案中的工作阶段变数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

在我的项目中,我有一些".aspx"和一些".html"文件.我在.aspx文件中创建了一个会话变量.我需要检查html文件中会话变量的存在,并且需要根据该条件执行一些代码.是否可以?如何检查html文件中的会话变量?

Hello,

In my project i have some ".aspx" and some ".html" files. I created a session variable in .aspx file. I need to check the existance of the session variable in html file and i need to do some code according to that condition.is it possible?How to check that session variable in html file?

推荐答案

一种方法是将Session值存储到HiddenField,然后可以在html页面中访问HiddenField值.
One way is to store your Session value to a HiddenField and you can access the HiddenField value in your html page.


使用隐藏字段可以执行任务.
Using hidden field you can perform the task.


这篇关于HTML档案中的工作阶段变数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆