日期:2014-05-18  浏览次数:20434 次

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

}