我需要从asp网站调用另一个网站的aspx页面。用的是queryString,在本地的IIS中,两个页面在同一个网站中时成功了。但拿到服务器上后,分别在两个网站中,提示:输入字符串格式不正确。
请问各位高手,该怎样解决啊?谢谢啦先!.asp页面:
<% userName=Server.HTMLEncode("用户名107868415")
pwd=Server.HTMLEncode("21218CCA77804D1922C33E0AA151105")response.redirect("http://office.863171.com/office/TransitionForOffice.aspx?userName="&userName&"&pwd="&pwd)
%>
.aspx页面:
string querystringFromAsp = Request.Url.Query; NameValueCollection nv = HttpUtility.ParseQueryString(querystringFromAsp,Encoding.GetEncoding("GB2312")); string userName = nv["userName"];
string password = nv["pwd"]; lbUN.Text = "查询>>>>" +userName ;得到的结果却是:
"没107868415"不知道什么原因,望高手指教啊,着急啊!
请问各位高手,该怎样解决啊?谢谢啦先!.asp页面:
<% userName=Server.HTMLEncode("用户名107868415")
pwd=Server.HTMLEncode("21218CCA77804D1922C33E0AA151105")response.redirect("http://office.863171.com/office/TransitionForOffice.aspx?userName="&userName&"&pwd="&pwd)
%>
.aspx页面:
string querystringFromAsp = Request.Url.Query; NameValueCollection nv = HttpUtility.ParseQueryString(querystringFromAsp,Encoding.GetEncoding("GB2312")); string userName = nv["userName"];
string password = nv["pwd"]; lbUN.Text = "查询>>>>" +userName ;得到的结果却是:
"没107868415"不知道什么原因,望高手指教啊,着急啊!
而不是Server.HTMLEncode