Monday, March 22, 2010

What if a Browser Does NOT Support Cookies?

If your application deals with browsers that do not support cookies, you will have to use other methods to pass information from one page to another in your application. There are two ways of doing this:
1. Add parameters to a URL
You can add parameters to a URL:
Go to Welcome Page
And retrieve the values in the "welcome.asp" file like this:
<% fname=Request.querystring("fname") lname=Request.querystring("lname") response.write(" Hello " & fname & " " & lname & "! ") response.write(" Welcome to my Web site! ") %>
2. Use a form
You can use a form. The form passes the user input to "welcome.asp" when the user clicks on the Submit button:

First Name:
Last Name:


Retrieve the values in the "welcome.asp" file like this:
<% fname=Request.form("fname") lname=Request.form("lname") response.write(" Hello " & fname & " " & lname & "! ") response.write(" Welcome to my Web site! ") %>
8.ASP Session Object

A Session object stores information about, or change settings for a user session.