日期:2014-05-17 浏览次数:20470 次
//ashx 方法调用
function startRequest(strParams) {
createXmlHttp();
var entid="";
if(ashxParamType==ashxParamEnum.showShip)
{
entid="&entid="+strCompany_ID;
}
//使用Get方式
var Queryurl = "FirstPage/QueryHandler.ashx?rnd="+Math.random()+"&major=" + strParams+entid;
xmlHttp.open("POST", Queryurl, true);
xmlHttp.onreadystatechange = bindclass;
xmlHttp.send(null);
}
public class QueryHandler : IHttpHandler,IReadOnlySessionState
{
public void ProcessRequest(HttpContext context)
{
//majorid,前端传过来的参数,组合参数 (前端js有说明)
string majorid = context.Request.Params["major"].ToString().Trim();
if (!majorid.Contains(DictConst.SPLIT_CHAR_VERTICAL_LINE))
return; //参数格式不合法
switch (majorid.Substring(0, 1))
{......}
}
}