当前位置: 代码迷 >> ASP.NET >> ================js里怎么调用.net里的Session==========
  详细解决方案

================js里怎么调用.net里的Session==========

热度:4957   发布时间:2013-02-25 00:00:00.0
================js里如何调用.net里的Session==========
如题!!!

------解决方案--------------------------------------------------------
在页面代码如下:

<head runat= "server ">
<title> 无标题页 </title>
<script>
function loadshow()
{
alert(document.all.hidenID.value);
}
</script>
</head>
<body onload= "loadshow() ">
<form id= "form1 " runat= "server ">
<input type=hidden runat= "server " id= "hidenID " />
</form>
</body>
</html>

在后台的Page_Load事件代码如下:
protected void Page_Load(object sender, EventArgs e)
{
this.hidenID.Value = "测试 ";

}
  相关解决方案