CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Remember Me Checkbox

Print topic Send  topic

Author Message
navcan

Posts: 61
Posted: 02/12/2004, 7:25 PM

Hello,

Is it possible to have Remember Me check box next to Login ID and Password Fields on login Page. Once the user click on checkbox, the application retains login id and/or password in cookies, so frequest users don't have to type their login ID and password next time when they want to use the application.

A function similar to hotmail login page where we have two check boxes, one for "Sign me in automatically" and the other one is for "Do not remember my e-mail address for future sign-in. (Select this when using a public computer.)"

Presently, I am using CC 2.0 (ASP with Templates and Access Database) and looking for a solution in either CodeCharge or CodeCharge Studio.

Any help would be great. Thanks.
View profile  Send private message
DonB
Posted: 02/12/2004, 7:46 PM

Use the checkbox to persist the cookies, by adding an expiration date to
them. When the checkbox is cleared, remove the expiration date from the
cookie. This needs to occur on the client side, so that means putting in a
little javascript. Check simplythebest.com for examples, or you might look
at some of the TechLinks I have listed on the main page of my website.


--
DonB

http://www.gotodon.com/ccbth
navcan

Posts: 61
Posted: 02/13/2004, 9:45 AM

Hello Don,

I just checked your site. Very nice...

Tried to find the javascript for remember me function - no luck. I know you have that feature on your site.

We will appreciate if you please share it with all of us as how you did it...

Regards,
navcan
View profile  Send private message
DonB
Posted: 02/13/2004, 11:59 AM

OK, here it is:

http://www.gotodon.com/ccbth/Features/knowledgebase.asp?find=remember

(Actually, this example is done server-side, not on the client as I
previously had suggested)

--
DonB

http://www.gotodon.com/ccbth
navcan

Posts: 61
Posted: 02/13/2004, 12:43 PM

Very Nice. Thank you Don.

Regards,
navcan
View profile  Send private message
Sean
Posted: 02/16/2004, 6:52 AM

Don,

Thanks for the example on this feature. This is something that I wanted to apply in my applications for a while.

I did what your example showed, but it doesn't appear to be writing a cookie.

I added your code to the On Click event of the login button.
I added a RememberMe checkbox to the login form (from the Forms tab, not HTML tab)

What else am I missing?

Thanks,
Sean
Sean
Posted: 02/16/2004, 9:04 AM

Ok, I guess I messed something up before, because I now have it writing the cookie.

But, when I close the browser and reopen the page, it does not remember the login or password.
Sean
Posted: 02/16/2004, 9:29 AM

Ok, I got it reading the cookie, but it just caches the username and password. The user still hast to click the login button.

Is there anyway to have the login page read the cookie and have it automatically login in if the cookie is present?
DonB
Posted: 02/16/2004, 9:39 AM

Probably - by moving it into another event like the page On Show or On
Initialize.

--
DonB

http://www.gotodon.com/ccbth


"Sean" <Sean@forum.codecharge> wrote in message
news:64030fdeacd2d6@news.codecharge.com...
> Ok, I got it reading the cookie, but it just caches the username and
password. The user still hast to click the login button.
>
> Is there anyway to have the login page read the cookie and have it
automatically login in if the cookie is present?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

lneisius

Posts: 29
Posted: 02/16/2004, 1:08 PM

The best way I found is to create a function within the common.asp and search to see if the cookie exist and if it does call the login function using the cookies.
View profile  Send private message
GaryDN

Posts: 34
Posted: 05/30/2004, 7:12 AM

Sean, how did you get it load from the cookies? I'm having the same problem, its saving the cookie ok

thanks
View profile  Send private message
GaryDN

Posts: 34
Posted: 05/30/2004, 4:30 PM

never mind

if I had only thought before I posted
View profile  Send private message
Ken
Posted: 06/02/2004, 6:47 AM

Hello,
I am trying to use your "Remember Me" Code, but i am also using the Select Case to Redirect users to the proper page, When i use your code it does not redirect the user anywhere, i tried to put the code before the redirect but that had no luck either, where should i put you code to work, Thanks,

' On successful login, persist cookies by giving them an Expires value   
  
If Login.RememberMe.Value Then   
  
Response.Cookies("login").Expires = "01/01/2030"   
Response.Cookies("pass").Expires = "01/01/2030"   
  
' Save login info in cookies   
  
Response.Cookies("login") = Login.login.Value   
Response.Cookies("pass") = Login.password.Value   
  
Else   
  
Response.Cookies("login") = ""   
Response.Cookies("pass") = ""   
  
End If 

I have tried everthing and still nothing, thanks for any help
LV
Posted: 06/02/2004, 9:12 AM

I tried DonB code as suggested above to my .NET (VB) project but I get error message during build process as shown below can someone tell me what I doing wrong :(? Thanks in advance.

** Here is the partial error code I got ***
\Login.aspx.vb(192) : error BC30456: 'RememberMe' is not a member of 'Login'.

\Login.aspx.vb(205) : error BC30526: Property 'Item' is 'ReadOnly'.

Response.Cookies("pass") = ""

DonB
Posted: 06/07/2004, 8:17 AM

An example that works (that I am actually using) is:

If CCGetGroupID() <10 Then Redirect = "clients/default.asp"

This appears in my code immediately after the "End If" shown in your
message. I redirect based on the user group, which may or may not be
exactly the "trigger" you want but the Redirect is the same regardless.

--
DonB

http://www.gotodon.com/ccbth


"Ken" <Ken@forum.codecharge> wrote in message
news:640bdda6b9e165@news.codecharge.com...
> Hello,
> I am trying to use your "Remember Me" Code, but i am also using the Select
Case
> to Redirect users to the proper page, When i use your code it does not
redirect
> the user anywhere, i tried to put the code before the redirect but that
had no
> luck either, where should i put you code to work, Thanks,
>
>
' On successful login, persist cookies by giving them an Expires  
value  
>  
> If Login.RememberMe.Value Then  
>  
> Response.Cookies("login").Expires = "01/01/2030"  
> Response.Cookies("pass").Expires = "01/01/2030"  
>  
> ' Save login info in cookies  
>  
> Response.Cookies("login") = Login.login.Value  
> Response.Cookies("pass") = Login.password.Value  
>  
> Else  
>  
> Response.Cookies("login") = ""  
> Response.Cookies("pass") = ""  
>  
> End If 
>
> I have tried everthing and still nothing, thanks for any help
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

ann
Posted: 07/09/2004, 4:10 AM

can u plz tell me how to use remember me feature in php?

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.