webbrowser. remember login for sites like facebook and dreamincode

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 4587 Views - Last Post: 18 February 2010 - 02:15 PM Rate Topic: ***** 1 Votes

#1 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

webbrowser. remember login for sites like facebook and dreamincode

Posted 16 February 2010 - 05:24 AM

Hi.
Im want my webbrowser to remember the username and password on page that user log in at.
Like FF where a bar appears and the user can chose to remember or not.
I don't really have any idea on how to do this so if anyone know how and could help me or could post a link that would be appreciated :)


Thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: webbrowser. remember login for sites like facebook and dreamincode

#2 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 16 February 2010 - 07:50 AM

Hi,

Facebook, DIC etc, make the use of cookies to do that... If you clear you cache in IE8 or Firefox, you will notice that you will have to login again...
Was This Post Helpful? 0
  • +
  • -

#3 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 16 February 2010 - 01:37 PM

View Postmotcom, on 16 February 2010 - 06:50 AM, said:

Hi,

Facebook, DIC etc, make the use of cookies to do that... If you clear you cache in IE8 or Firefox, you will notice that you will have to login again...

oh yes ^^ why didn't I think of that? ^^
but, how do I save them or what ever I should do?
and how do my web browser know when I've typed a password and username?
Was This Post Helpful? 0
  • +
  • -

#4 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 16 February 2010 - 01:43 PM

View Postmotcom, on 16 February 2010 - 06:50 AM, said:

Hi,

Facebook, DIC etc, make the use of cookies to do that... If you clear you cache in IE8 or Firefox, you will notice that you will have to login again...

oh yes ^^ why didn't I think of that? ^^
but, how do I save them or what ever I should do?
and how do my web browser know when I've typed a password and username?

Edit. sorry about the multi-post.. but DIC's server is behaving strange.

This post has been edited by EndLessMind: 16 February 2010 - 01:52 PM

Was This Post Helpful? 0
  • +
  • -

#5 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 16 February 2010 - 11:07 PM

Hi,

here is a site that explains it a bit with some code (for asp.net)

Working with cookies
Was This Post Helpful? 0
  • +
  • -

#6 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 04:22 AM

View Postmotcom, on 16 February 2010 - 10:07 PM, said:

Hi,

here is a site that explains it a bit with some code (for asp.net)

Working with cookies

well ASP is for web applications right?
and that code in ASP required that the user pressed a "create cookie" button every time the user want to save a cookie.

The only time the user should have to press a button to save cookies in my web browser should be when the cookie might contain user name and password for the site.
Was This Post Helpful? 0
  • +
  • -

#7 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 04:47 AM

well as per usual what have you done so far in code?
Was This Post Helpful? 0
  • +
  • -

#8 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 04:54 AM

View Postmotcom, on 17 February 2010 - 03:47 AM, said:

well as per usual what have you done so far in code?

what event do you need? because i got a lot of code. about 13.1MB of just codes.
so it would not be a good idea to post it all.
Was This Post Helpful? 0
  • +
  • -

#9 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 11:16 PM

Maybe the code of how you try to write a cookie and how you attempt to get the info back from it?

Read the forum rules....
Was This Post Helpful? 0
  • +
  • -

#10 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 11:43 PM

View Postmotcom, on 17 February 2010 - 10:16 PM, said:

Maybe the code of how you try to write a cookie and how you attempt to get the info back from it?

Read the forum rules....

YES!!! but i DON'T know what event. I DON'T know how to write write or get the info back.

so i don't have that code.
Otherwise i wouldn't have started this tropic.
Because i need help figuring out the code.

This post has been edited by EndLessMind: 17 February 2010 - 11:45 PM

Was This Post Helpful? 0
  • +
  • -

#11 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 17 February 2010 - 11:57 PM

well, you would have

- 2 textboxes, username and password.
- one check box for remember me
- a login button.

if the user has clicked on the Login Button and is actually a user of the site, then check if the "Remember me" check box is checked, if yes, write to the cookie.

If the page is closed and re-opened, check if there is a cookie that has the "Rember Me" part and login in automatically...

(you might want to keep the username and password in the cookie for your app to use as login)
Was This Post Helpful? 0
  • +
  • -

#12 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 18 February 2010 - 03:50 AM

View Postmotcom, on 17 February 2010 - 10:57 PM, said:

well, you would have

- 2 textboxes, username and password.
- one check box for remember me
- a login button.

if the user has clicked on the Login Button and is actually a user of the site, then check if the "Remember me" check box is checked, if yes, write to the cookie.

If the page is closed and re-opened, check if there is a cookie that has the "Rember Me" part and login in automatically...

(you might want to keep the username and password in the cookie for your app to use as login)

yes..but those 4 contols should be on the site right. i would not have to add them by my selft right?

So if we start at making my app save cookies.
Then i need to know:
what kind of information does a cookie contain?
In what event should i my app get that information ( navigated,documentcompleted )?
What event should my app read the cookis ( navigating, new window ) ?
Which file format should the cookie be saved in or could it be a textfile?


Thanks in advance
Was This Post Helpful? 0
  • +
  • -

#13 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 18 February 2010 - 04:46 AM

You would have to add them yourself...

On the Page load event you have to browse for the cookie and check if there is data (username, password, if the rememberme is set to true etc.)

When the login button is clicked, then you write to the cookie...
Was This Post Helpful? 0
  • +
  • -

#14 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 18 February 2010 - 05:02 AM

here is an example derived from the link that i gave you...

Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        Dim newCookie As HttpCookie = New HttpCookie("MyApplication")
        newCookie.Values.Add("UserName", txtUserName.Text)
        newCookie.Values.Add("Password", txtPassword.Text)
        newCookie.Values.Add("RememberMe", chkRememberMe.Checked)
        newCookie.Expires = #12/31/2011#
        Response.Cookies.Add(newCookie)
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Request.Cookies("MyApplication") Is Nothing Then
            If CBool(Request.Cookies("MyApplication")("RememberMe")) = True Then
                'do something with the username and password, like logging in...
                lblUserName.Text = Request.Cookies("MyApplication")("UserName")
                lblPassword.Text = Request.Cookies("MyApplication")("Password")
            End If
        End If
    End Sub


Was This Post Helpful? 0
  • +
  • -

#15 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: webbrowser. remember login for sites like facebook and dreamincode

Posted 18 February 2010 - 08:30 AM

View Postmotcom, on 18 February 2010 - 04:02 AM, said:

here is an example derived from the link that i gave you...

Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        Dim newCookie As HttpCookie = New HttpCookie("MyApplication")
        newCookie.Values.Add("UserName", txtUserName.Text)
        newCookie.Values.Add("Password", txtPassword.Text)
        newCookie.Values.Add("RememberMe", chkRememberMe.Checked)
        newCookie.Expires = #12/31/2011#
        Response.Cookies.Add(newCookie)
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Request.Cookies("MyApplication") Is Nothing Then
            If CBool(Request.Cookies("MyApplication")("RememberMe")) = True Then
                'do something with the username and password, like logging in...
                lblUserName.Text = Request.Cookies("MyApplication")("UserName")
                lblPassword.Text = Request.Cookies("MyApplication")("Password")
            End If
        End If
    End Sub


why do i need to add the controls to my form?
im going to type the username and password on the site.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2