日期:2014-05-17  浏览次数:20687 次

中文乱码的问题
a页面
C# code

                string reason = "该单据不存在";
                Response.Redirect("../error.aspx?reason=" + reason);



error页
C# code

            string reason = Request.QueryString["reason"];
            if (reason == "")
            {
                reason = "请联系系统管理员,";
            }
            lblreason.Text = reason;


error页的aspx页面里有这么一句
HTML code

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">



web.config是这样设置的
C# code

    <globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312"  />



为什么跳转到error页面 “该单据不存在”这句话是乱码呢?

------解决方案--------------------
useFullyQualifiedRedirectUrl="true" 改成false