本文介绍了Cookies在IE中工作,但在mozila firefox中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...
以下代码对于IE来说是正常工作,但在Mozilla Firefox中不起作用...在关闭浏览器Cookie值后,该值被破坏了


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

推荐答案



这篇关于Cookies在IE中工作,但在mozila firefox中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 15:49