之前是好的,后来怎么获取都是NULL
难道和IIS有关? url: 'Handler.ashx?action=list&ran=' + Math.random(),
context.Response.ContentType = "text/plain";
string action = ParamsofEasyUI.RequstString("action");
//string test = context.Request.QueryString["action"];
//string a = HttpContext.Current.Request["ran"].ToString();
// string a = context.Request.Params["action"];
难道和IIS有关? url: 'Handler.ashx?action=list&ran=' + Math.random(),
context.Response.ContentType = "text/plain";
string action = ParamsofEasyUI.RequstString("action");
//string test = context.Request.QueryString["action"];
//string a = HttpContext.Current.Request["ran"].ToString();
// string a = context.Request.Params["action"];
后面的去掉试试?
ParamsofEasyUI.RequstString
type: "POST",
url: "../Ajax/AjaxBusStationAndLine.ashx",
data: { OperType: "UpdateLine", LineID: lineid,LineNum:linenum, LineName: linename, FlightID: flightid, LineColor: linecolor, LineWidth: linewidth, ScheduleBusNo: schedulebusno, TotalMilage: totalmilage, LineAvgSpeed: lineavgspeed, LineType: linetype, IsEnable: isenable, LowSpeed: lowspeed, LimitSpeed: limitspeed },
dataType: 'text',
success: function(data){
if (data == "TRUE"){
alert("修改成功");
} else {
alert("修改失败");
}
parent.ymPrompt.close();
parent.onloadStationLineList();
},
error: function (xhr) {
alert("错误:" + xhr.toString());
}
});ashx获取值: string opertype = context.Request["OperType"];//BusDevList
你的action=list中的list是什么?是对象还是字符串?如果是字符串,应该用单引号括号起来