如何在用户控件中使用Response.Write
来响应所有页面而不仅仅是用户控件本身?
function genericAjax(url, data) {
$.ajax({
type: "POST",
url: url,
data: data,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
if(data.d == "refresh")
{
location.reload();
}
}
});
}
pageLoad的
if(Request.Form["ajax"])
{
//some code
Response.Write("refresh");
}