共享Session
来源:互联网 发布:淘宝刷粉丝软件 编辑:程序博客网 时间:2024/05/01 08:45
asp.net转入asp
trans.aspx
private void Page_Load(object sender, System.EventArgs e)
{
Session["name"] = "dfsdf";
Session["sex"]="F";
Response.Write("<form name=frm id=frm action=aspxtoasp.asp method=post>");
foreach(object obj in Session.Contents)
{
Response.Write("<input type=hidden name='"+obj.ToString()+"'");
Response.Write(" value = '"+Session[obj.ToString()].ToString()+"'>");
}
try
{
if(Request.QueryString["DestPage"].ToString().Length > 4 )
{
Response.Write("<input type=hidden name='DestPage'");
Response.Write(" value = '"+Request.QueryString["DestPage"].ToString()+"'>");
}
}
catch{}
Response.Write("</form>");
Response.Write("<scr"+"ipt language='javascript'>frm.submit();</scr"+"ipt>");
}
aspxtoasp.asp
<%for i=1 to Request.Form.Count Session(Request.Form.Key(i))=Request.Form(i) next if Len(Session("DestPage")) >4 then Response.Write(Session("DestPage")) end if call allsession() function allsession() Response.Write "There are " & Session.Contents.Count &" Session variables
" Dim strName, iLoop For Each strName in Session.Contents'使用For Each循环察看Session.Contents If IsArray(Session(strName)) then '如果Session变量是一个数组? '循环打印数组的每一个元素 For iLoop = LBound(Session(strName)) to UBound(Session(strName)) Response.Write strName & "(" & iLoop & ") - " & _ Session(strName)(iLoop) & "
" Next Else '其他情况,就简单打印变量的值 Response.Write strName & " - " & Session.Contents(strName) & "
" End If Next end function%>
把所有的Session都写入了asp session.
- 共享Session
- session共享
- session共享
- session 共享
- session共享
- session共享
- session共享
- session共享
- session共享
- session共享
- Session共享
- session共享
- session共享
- session共享
- session共享
- session 共享
- session共享
- session 共享
- Spring的核心机制依赖注入简介
- VC++动态链接库编程之MFC扩展 DLL
- ORACLE备份策略
- 如何学好C++,用好类库很重要
- GridView全选并删除所有列的问题
- 共享Session
- 教你理解复杂的C/C++声明
- Sybase数据库备份方案
- 指针函数和函数指针有什么区别
- 35岁前成功的12条黄金法则
- 我觉得他是个英雄
- 纪念saddam
- 日期加减的函数
- .Net vs. J2EE-----面对SOA的荒谬与误解