
| <%
@ Language="JavaScript"
%>
<% var ExpireDate = new Date(); var strEmail; Here we determine if the page was requested by the redirection from the login.asp page. We set a query string parameter called cookie when we redirected the browser to this page. By checking to see if its value is set to 1, we will know if this page was called due to a cookie login. There are 2 possible places that the user's email address can come from. If they have selected to save their logon information in a cookie, then their email address can be retrieved from that cookie. If they have entered their email directly, then we can recover it from the Request Object. In either case, we save it to a global variable strEmail. This will allow us to use it later in the page, without having to check which method it was supplied by again. if (Request("cookie")
== 1) strEMail = Request.Cookies("SavedLogin")("EMail"); var bLoginSaved if (Request("SaveLogin")
== "ON") { %> <HTML> <HEAD><TITLE>Cookie Test - Check Login</TITLE></HEAD> <BODY> <% if (bLoginSaved) { %> Saving Login information to a cookie <HR> <% } %> Thank you for logging into the system. <P> We want to display an indication to the user that their login information was supplied via a cookie. <% if (Request("cookie") == 1) { %> Login submitted via cookie <P> <% } %> E-Mail address confirmation: <% = strEMail %> </BODY> |