[VS2005 .aspx]
AAA.aspx页面有个链接
<a href="BBB.aspx?id=1&name=中文">哈哈</a>我在BBB.aspx页面Load事件怎么接收? 不显示成乱码(本人确实是ASP.NET新手,没有耍人的意思)
AAA.aspx页面有个链接
<a href="BBB.aspx?id=1&name=中文">哈哈</a>我在BBB.aspx页面Load事件怎么接收? 不显示成乱码(本人确实是ASP.NET新手,没有耍人的意思)
接收页面进行Server.UrlDecode即可。。
AAA.aspx页面 设置语言信息为 utf-8 看看,不行换为 gb2312
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />接收页面进行Server.UrlDecode
a.aspx.cs if (Request.QueryString["id"] != null)
{
string i = Server.UrlDecode(Request.QueryString["id"].ToString());
}
string str=Request["name"];
request.from.get("name");
request.from.get("id");
就能获取到AA页面传过来的值啦
然后在BB后台里面写HttpUtility.HtmlDecode();解码
页面写这个<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 然后在后台if (Request.QueryString["id"] != null)
{
string i = Server.UrlDecode(Request.QueryString["id"].ToString());
}
这样获取
给配置文件加上这个就行了!