问题描述
varHttp=null;if(window.ActiveXObject){Http=newActiveXObject("Microsoft.XMLHTTP")}elseif(window.XMLHttpRequest){Http=newXMLHttpRequest()//if(Http.overrideMimeType)//Http.overrideMimeType('text/xml');}Http.open("post",default.aspx,true)Http.setrequestheader("content-length",Str.length);Http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");Http.send("uid=123").net2.0服務端:protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){if(Request.Form["userName"]!=null){Response.Clear();Response.ClearContent();Response.Cache.SetNoStore();Response.ContentType="text/xml";Response.ContentEncoding=System.Text.Encoding.UTF8;Response.Write(Request.Form["userName"].ToString());}}}Request.Form["userName"]取不到參數啊
解决方案
解决方案二:
if(Request.Form["userName"]!=null)放在ISPOSTBACK外面试下~或者requst["userName"]试下~
解决方案三:
if(Request.Form["uid"]!=null)
解决方案四:
Request.Form["userName"]输出看看是什么值??
解决方案五:
if(Request["uid"]!=null)
解决方案六:
Request["uid"]也是null
解决方案七:
看看你那个请求的url对不对?