ASP and sharing session

Source: Internet
Author: User
This is an old topic, because recently used, so there is no way to find information everywhere. Microsoft's Web site is provided by the database, always feel too cumbersome, but also said to use directly, but I did not try to succeed. I think it's impossible to use it directly. There is another way, is through a few page conversion, I use this method, by summing up the search to the data, sorted out after a few pages to convert. Mainly through the hidden input to achieve. The specific methods are as follows:
ASP goto page:
With an ASP page, the session information is written to the input, submitted to the page
"----------test Data--------
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) & ">")
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 ("&LT;SCR" + "ipt>frm.submit (); &LT;/SCR" + "ipt>")
<%@ 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 (); Output all sessions, annotated when used
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.