当前位置: 代码迷 >> ASP.NET >> !无法获取XMLHttpRequest.send方法传的值
  详细解决方案

!无法获取XMLHttpRequest.send方法传的值

热度:1632   发布时间:2013-02-25 00:00:00.0
求助!无法获取XMLHttpRequest.send方法传的值。
如题~求助
<SCRIPT   CODE>
<script   language= "javascript "   type= "text/javascript ">
var   xmlHttp;

function   createXMLHttpRequest()   {
xmlHttp   =   new   ActiveXObject( "Microsoft.XMLHTTP ");
}
       
function   startRequest()   {
        createXMLHttpRequest();
        xmlHttp.onreadystatechange   =   handleStateChange;
       
        xmlHttp.open( "GET ",createQueryString(),   true);
        xmlHttp.send();
}

function   createQueryString()   {
var   QueryString;
if(document.getElementById( "City ").value   !=   " ")
{
QueryString   =   "DealData.aspx?ID= "   +   document.getElementById( "City ").value;
}
return   QueryString;
}
</SCRIPT   CODE>

<C#   CODE>
try
{
string   ff   =   Request.Url.ToString();
City   =   Page.Request.QueryString[ "CityID "].ToString();
if(City.Equals( " "))
{
City   =   "aa ";
}
}
catch(Exception   err)
{
City   =   "bb ";
}
</C#   CODE>

但是。。catch不到。。而且Page.Request.QueryString[ "CityID "].ToString();没有任何值

------解决方案--------------------------------------------------------
DealData.aspx?ID= "
这个传过去的是ID,不是CityID
  相关解决方案