function aaa() {
$.ajax({
type: "post",
url: "Ajax/Ajax2.aspx?" + (new Date()).valueOf(),
data: { dbType: "StatusList" },
dataType: "html",
success: function (data) {
$('#divmsg').html(data);
},
error: function (a, textStatus, errorThrown) {
$('#divmsg').html('ajax错误');
}
});
}
后台代码
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string txt1 = Server.UrlDecode(Request["dbType"].ToString());
Response.Write(txt1 + "</br>" + txt2);
}
}
Request["dbType"] 为null
我测试过了
调用一般处理程序ashx页面 get post都可以接收到参数
调用aspx页面 get可以接收到参数,但是post接收不到参数。请问这是为什么呢?
谢谢各位了~~~