shlvy Posted October 29, 2003 Posted October 29, 2003 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 Quote
bungpeng Posted October 29, 2003 Posted October 29, 2003 I can't get what you mean... Did you set expires date for your cookies? Is it expires when user close the browser? when he return to the site he has to make refresh? he use "Back" button in browser? what do you mean by "return"? Quote
shlvy Posted October 29, 2003 Author Posted October 29, 2003 Return Hi I mean when he leave the site to aother site and return to my site he suppoosed to see welcome message with the UserName because the cookies , but the welcome message will show only after you make a refresh after you return to the site. And no i didnt use any expired time of the cookies. Thank's Quote
bungpeng Posted October 30, 2003 Posted October 30, 2003 If user return to your site with URL entered, and still need to refresh, then it may due to Cache memory problem. It is nothing to do with your cookies. In top of your source, just put some codes to disable the cache. I can't remember what are those codes, but you can easily found it on book or Internet. In ASP, it is something like: Response.Expires = -1 ... ... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.