首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2011-12-19 
js里如何调用.net里的Session如题!!![解决办法]在页面代码如下:head runat

================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 = "测试 ";

}

热点排行