How to use cookies properly in ASP? _ Programming 10000 Q

Source: Internet
Author: User

Remberme.asp

' user submits personal information .

<%

Response. Cookies ("Information") (" names ") =request.form ( "name")

Response. Cookies ("Information") (" customer number ") =request.form ("id" )

Response. Cookies ("Information") (" from ") =request.form ( "from" )

......

' define a cookie dictionary called Information , and you can define more if you need it .

%>

<title> Galaxy Shadow </title>

<body>

<div align= "center" ><center>

<table border= "0" cellspacing= "0" width= "height=" >

<tr>

<TD height= "><p" align= "center" ><font> the cookie application of the star of the Galaxy </font></td>

</tr>

<tr>

<TD align= "center" height= "><form method=" post "action=" remberme.asp ">

<p><font>   

Name : <input type= "text" name= "name" size= "> <br>  

customer number : <input type= "text" name= "id" size= "> <br>  

From : <input type= "text" name= "Nation" size= ">    "

</font><br>

<input type= "Submit" value= " I want to inquire "   >

<input type= "reset" value= " rewrite " >

</p>

</form>

</td>

</tr>

</table>

</center></div>

</body>

Welcome.asp

' show the contents of Cookies .

<title>cookies demo</title>

<body>

Name

<%=request. Cookies ("Information") ("name")%>

<p>

Customer number

<%=request. Cookies ("Information") ("id")%>

<p>

From

<%=request. Cookies ("Information") ("from")%>

</body>

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: info-contact@alibabacloud.com 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.