I'm a newbie to asp.net...

Just creating a simple login page...
I have the user name nand passwords stored in a database table.

On the web form I have the text boxes and a check box to "Remember my Password" so they get logged in without having to authenticate themselves.

How do I implement this "Remember Me" feature. I just want it so that when a user clicks this he / she doesnt have to type in a user name and password.

I know it has to do with cookies, but can anyone provide example code or steps on how to do this ?

Here is my authentication code:

VB Code:
  1. <%@ Page Language="VB" %>
  2. <%@ import Namespace="System.Data" %>
  3. <%@ import Namespace="System.Data.SqlClient" %>
  4. <script runat="server">
  5.  
  6.     Sub Page_Load
  7.        Dim strLinkPath As String
  8.    
  9.        If Not IsPostBack Then
  10.          strLinkPath = String.Format( "Register/Register.aspx?ReturnUrl={0}", _
  11.            Request.Params( "ReturnUrl" ) )
  12.          lnkRegister.NavigateUrl = String.Format( strLinkPath )
  13.        End If
  14.     End Sub
  15.    
  16.     Sub Button_Click( s As Object, e As EventArgs )
  17.        If IsValid Then
  18.          If DBAuthenticate( txtUsername.Text, txtPassword.Text ) > 0 Then
  19.            FormsAuthentication.RedirectFromLoginPage( txtUsername.Text, False )
  20.          End If
  21.        End If
  22.     End Sub
  23.    
  24.     Function DBAuthenticate( strUsername As String, strPassword As String ) As Integer
  25.        Dim conMyData As SqlConnection
  26.        Dim cmdSelect As SqlCommand
  27.        Dim parmReturnValue As SqlParameter
  28.        Dim intResult As Integer
  29.    
  30.        conMyData = New SqlConnection( "Server=blah;UID=IMS;PWD=blah123;Database=blah" )
  31.        cmdSelect = New SqlCommand( "DBAuthenticate", conMyData )
  32.        cmdSelect.CommandType = CommandType.StoredProcedure
  33.        parmReturnValue = cmdSelect.Parameters.Add( "RETURN_VALUE", SqlDbType.Int )
  34.        parmReturnValue.Direction = ParameterDirection.ReturnValue
  35.        cmdSelect.Parameters.Add( "@username", strUsername )
  36.        cmdSelect.Parameters.Add( "@password", strPassword )
  37.        conMyData.Open()
  38.          cmdSelect.ExecuteNonQuery()
  39.          intResult = cmdSelect.Parameters( "RETURN_VALUE" ).Value
  40.        conMyData.Close()
  41.        If intResult < 0 Then
  42.          If intResult = -1 Then
  43.            lblMessage.Text = "Username Not Registered!"
  44.          Else
  45.            lblMessage.Text = "Invalid Password!"
  46.          End If
  47.        End If
  48.        Return intResult
  49.     End Function
  50.  
  51. </script>

And I can get that part (although even after authentication it does not redirect the user . Now how do I implement the "remember my password" feature??????