asp登陆页面
<style type="text/css">
<!--
body {
background-color: #FFFFCC;
}
-->
</style><table cellspacing="1" cellpadding="2">
<tr>
<td>.:: 網站管理中心 </td>
</tr>
</table>
<table cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="664" cellpadding="0" cellspacing="0">
<tr>
<td valign="center" align="middle"><strong><br>
<br>
<br>
<br>
歡迎進入系統管理中心 </strong><br>
<br>
<br>
<br>
<br>
恭喜,恭喜! <br>
<br>
您已經成功登陸! <br>
<br>
<br>
<br></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0">
<tr>
<td align="middle">程式設計: <a href="http://www.aaa.com">商訊科技 </a> 版本:V2.0 </td>
</tr>
</table>
<%@ Page language="c#" %>
<script language=C# runat=server>
private void Page_Load(object sender, System.EventArgs e)
{
Session.Timeout = 60;
for(int i=0;i<Request.Form.Count;i++)
{
Session[Request.Form.GetKey(i)]=Request.Form[i].ToString();
}
allsession();
try
{
if( Session["DestPage"].ToString().Length >4 )
{
Server.Transfer(Session["DestPage"].ToString(),true);
}
}
catch{}
}
private void allsession()
{
Response.Write ("There are " + Session.Contents.Count +" Session <I>var</I>iables<P>");
foreach(object obj in Session.Contents)
{
Response.Write("Session["+obj.ToString()+"] - "+Session[obj.ToString()].ToString()+"<br>");
}
}
</script>
跳转到asp.net页面内的代码:
<%
session("name")="srx"
session("id")="1"
session("sex")="f"
session("pass")="asdfas"
session("age")="23"
session("weight")="131"
Response.Write("<form name=frm id=frm action=""asptoaspx.aspx"" method=post >")
for each Item in Session.Contents
Response.Write "<input type=hidden name="&Item
Response.Write " value=" & Session(item) & " >"
next
if len(Request.QueryString("Destpage")) >4 then
Response.Write("<input type=hidden name=DestPage value=" & Request.querystring("DestPage") & ">")
end if
Response.Write("</FORM>")
Response.Write("<scr" + "ipt>frm.submit();</scr" + "ipt>")
%>