- Classic ASP file upload limit of 200kb in IIS 7L
- Find Column with Lower Case Text
- 0x8007232B DNS Name Does Not Exist Error on Windows Activation
- How to update a column with incrementing numbers
- How to get top N rows for each group?
- How to put a column into a delimited form
- How to export results of a stored procedure to a txt file
- Parsing delimited words from a column
- How to get N-th max value
- How to get a random row from a table
Using Cookies in your ASP page
Cookies, those small files that live in the Temporary Internet Files folder, are a great way to personalize your Active Server web pages. The following ASP/HTML code creates a page that will ask a user to enter their name the first time they visit the page, then recognize and greet them by name each subsequent visit.
At the top of your page:
IF NOT (Request.Form("Name") = "") THEN
Response.Cookies("Name") = Request.Form("Name")
Response.Cookies("Name").Expires = "Jan 1, 2000"
In the Body of your page:
IF Request.Cookies("Name") = "" THEN
Response.Write("<FORM Method=Post>Enter Your Name: ")
Response.Write("<INPUT Type=Text Name=Name> ")
Response.Write("Welcome back, "&Request.Cookies("Name"))