Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi...
the following code is working properly for IE but its not working in Mozilla Firefox...after closing browser cookies values are getting destroyd


If RememberMe = "Yes" Then
            if(companyFormultiDB <> "") then
                Response.Cookies("User")("AccNo") = companyFormultiDB            end if
            if(login_Email <> "") then
                Response.Cookies("User")("Email") = login_Email            end if
            if(login_Password <> "") then
                Response.Cookies("User")("Password") = login_Password            end if
            Response.Cookies("User").Expires =  Now() + LoginCookieExpireTime  '' LoginCookieExpireTime can be set in web.config            'Response.Cookies("User").Expires =  "2009/12/31" 'TOCHANGE TO DATEDADD  + 30days
        Else
            Response.Cookies("User")("Email") = ""
            Response.Cookies("User")("Password") = ""
            Response.Cookies("User")("AccNo") = ""
            'Response.Cookies("User").Expires =  Now() + LoginCookieExpireTime  '' LoginCookieExpireTime can be set in web.config        End If


"vb">If UCase(Request.ServerVariables("REQUEST_METHOD")) = "POST" Then
    Dim svd_AccNo : svd_AccNo = Request.Cookies("User")("AccNo")   ' Dim svd_AccNo : svd_AccNo = Server.HTMLEncode(Request.Form("AccNo"))    Dim svd_Email : svd_Email = Server.HTMLEncode(Request.Form("username"))    'Dim svd_Email : svd_Email = Request.Cookies("User")("Email")    Dim svd_Password : svd_Password = Server.HTMLEncode(Request.Form("password"))    Dim svd_RememberMe : svd_RememberMe = Server.HTMLEncode(Request.Form("chkRemember"))    If svd_RememberMe = "Yes" Then
        svd_RememberMe = "checked"
    End If
Else
    svd_Email = Request.Cookies("User")("Email")        response.Write(svd_Email)    svd_Password = Request.Cookies("User")("Password")    svd_AccNo = Request.Cookies("User")("AccNo")    If Not svd_Email = "" AND Not svd_AccNo = "" Then
        svd_RememberMe = "checked"
    End If
End If
Posted

Firefox will remove cookies if the privacy settings are set to not remember the histoy.

You can check the setting by going to ->Tools -> Options -> Privacy
 
Share this answer
 
Same problem with me. Remember cookies for some sites and not for other sites.
 
Share this answer
 
Comments
Dylan Morley 12-Apr-11 7:22am    
Check Martins solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900