Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

I have a problem with Request Cookies in my site.

I make the Cookies with the code :

Response.Cookies("forfera").Value = sqlText

sqlText is just some string.

I meant to remember the UserName of the login members.

So the real problem is that when the member return to the site again after he successfuly logined and the cookie was made , when he returns to the site he has to make refresh to get the welcome message with is UserName , from that i can understand the cookies has been made right but there is a problem with the return (Page_Load) , the Page_Load's code is :

 

sub Page_Load(obj as object, e as eventArgs)

 

if Not Request.Cookies("forfera") is Nothing then

lblMessage.Text = "welcome Back" + " " +Server.HtmlEncode(Request.Cookies("forfera").Value)

else

lblMessage.Text = "Hello Guest"

end if

 

end sub

 

So Thank's for all,

bye

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...