VB Code:
'writing to the cookie
Dim ckInfo As New HttpCookie("MHCPrivate")
ckInfo.Values.Add("Username", txtUsername.Text)
ckInfo.Values.Add("Password", txtPassword.Text)
ckInfo.Values.Add("LastVisit", Now.Date)
ckInfo.Values.Add("RememberMe", chkPersist.Checked)
ckInfo.Expires = DateTime.MaxValue 'MaxValue is pretty much Forever
Response.AppendCookie(ckInfo)
'reading from the cookie
Dim ckInfo As HttpCookie
ckInfo = Request.Cookies("MHCPrivate")
'You might add some error handling here to make sure the cookie is not nothing
txtUsername.Text = ckInfo.Values("Username")
txtPassword.Text = ckInfo.Values("Password")