If chk_remember.Checked = True Then
Dim ckUserName As HttpCookie = New
HttpCookie("CTUserName")
ckUserName.Value = Trim(txt_unm.Text)
ckUserName.Expires =
System.DateTime.Now.AddYears(4)
Response.Cookies.Add(ckUserName)
ckUserName = Nothing
End If
Now I am retrieving cookie on page load. It always gives me blank text
box of username. I don’t understand why it gives null. Is that I am
doing anything wrong?
My code for retrieving cookie is:
If Not (Request.Cookies("CTUserName") Is Nothing) Then
txt_unm.Text = Request.Cookies("CTUserName").Value
End If
Any help will be appreciated.
Thanks,
SV
> Any help will be appreciated.
Does this work: ?
txt_unm.Text = Server.HtmlEncode(Request.Cookies("CTUserName").Value)
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Thanks Mark.
On May 7, 6:26 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> "SV" <swetav...@gmail.com> wrote in message