|
 |
asp_databases thread: Cookie value
Message #1 by "Rakesh Parekh" <rakesh.parekh@j...> on Wed, 18 Sep 2002 09:14:36
|
|
Hello,
I have three different ASP pages which show data result based on the
password entered. All these three pages have the same password but have
different data result. I want the user to enter password only once in any of
these three ASP pages to see the database result. The rest of the two pages
should automatically cache the password and one will have to just click to
see the result instead of typing the password itself again and again for
every page. I had following code in mind but it didn't work:
1) I store the password value in cookie
<% Response.Cookies("password") = Request.Form("Password") %>
I put this line of code in all my three ASP pages.
2) Then in the Text field of all the three ASP pages, I put code as under:
TextboxName = "PASSWORD" Value = <%=Request.Cookies("password")%>
I thought that when I enter the password for the first time, it is stored in
Cookie named "password" so it is available to other two pages through
Request.Cookies("password") code. But it was not so.
Since the TexboxName Value has ASP code <%=Request.Cookies("password")%>, at
browser it doesn't show any Value nor the star. If some other way it can
show this value then user will just have to click on the button to view the
result and will not have to type the password again.
Many of the sites allow the user to save password. In that case the Textbox
shows star (*******) so user just click without typing the password. How do
I show the value in form of star through
<%=Request.Cookies("password")%> ?
The Cookies I want to use are the Session Cookies.
Can anybody please help?
Best regards,
Rakesh
Message #2 by Greg Griffiths <greg2@s...> on Wed, 18 Sep 2002 17:14:29 +0100
|
|
How are you creating the cookies, it seems like you may have a scope issue
with the cookies, download something like CookiePal to see if the cookie is
being set and then check the domain to ensure that it is visible.
At 09:14 18/09/02 +0000, you wrote:
>Hello,
>
>I have three different ASP pages which show data result based on the
>password entered. All these three pages have the same password but have
>different data result. I want the user to enter password only once in any of
>these three ASP pages to see the database result. The rest of the two pages
>should automatically cache the password and one will have to just click to
>see the result instead of typing the password itself again and again for
>every page. I had following code in mind but it didn't work:
>
>1) I store the password value in cookie
>
><% Response.Cookies("password") = Request.Form("Password") %>
>
>I put this line of code in all my three ASP pages.
>
>2) Then in the Text field of all the three ASP pages, I put code as under:
>
>TextboxName = "PASSWORD" Value = <%=Request.Cookies("password")%>
>
>I thought that when I enter the password for the first time, it is stored in
>Cookie named "password" so it is available to other two pages through
>Request.Cookies("password") code. But it was not so.
>Since the TexboxName Value has ASP code <%=Request.Cookies("password")%>, at
>browser it doesn't show any Value nor the star. If some other way it can
>show this value then user will just have to click on the button to view the
>result and will not have to type the password again.
>
>Many of the sites allow the user to save password. In that case the Textbox
>shows star (*******) so user just click without typing the password. How do
>I show the value in form of star through
><%=Request.Cookies("password")%> ?
>
>The Cookies I want to use are the Session Cookies.
>
>Can anybody please help?
>
>Best regards,
>Rakesh
>
|
|
 |