【发布时间】:2016-03-09 00:26:04
【问题描述】:
string ID = context.Request.QueryString["BudgetId"] == null ? null : context.Request.QueryString["BudgetId"].ToString();
context.Response.ContentType = "text/Plain";
string Budgetid = context.Request["ID"];
string Country = context.Request["ddlcountry"];
string State = context.Request["ddlstate"];
string City = context.Request["ddlcity"];
string Location = context.Request["txtlocation"];
上面我正在获取来自 ASPX 页面但 ID 来自 ASPX 页面的所有控制 IDS 如何在通用处理程序中传递国家、州、城市值
【问题讨论】:
-
如何传递查询字符串?放代码
-
这里所有的控制值都应该来自aspx,就像我选择了国家ID,相应的州城市应该在budgetID的帮助下去通用处理程序
-
此时你不能因为注册的处理程序已经完成处理。
-
将此控件选定值传递给处理程序的任何其他替代方法
-
请看我的回答。您需要在 web config 的 handlers 部分注册您的处理程序,然后通过处理程序中的 Context 处理请求。