AJAX调用后台方法后,不会刷新页面?
前台代码:
function clicke(a, b, c) {
$.ajax({
type: "POST",
url: "SummaryList.aspx",//你后台请求URL地址
data: "btn=" + document.getElementById("'" + a + "'").innerText + "&id=" + document.getElementById("'" + b + "'").innerText + "&conferencetype=" + document.getElementById("'" + c + "'").innerText,
});
}
后台代码:
if (Request.Params["btn"] != null && Request.Params["btn"].Trim() != "")
{
btn = Request.Params["btn"];
if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
{
id = Request.Params["id"];
if (Request.Params["conferencetype"] != null && Request.Params["conferencetype"].Trim() != "")
{
conferencetype = Request.Params["conferencetype"];
if (pt.DeletedSummaryList(btn, id, conferencetype))
{
Response.Redirect(Request.Url.ToString()); //调试走过了这里,却不会刷新页面
}
}
}
}
我这是个删除的功能,点击删除按钮后,跳到后台删除方法中删除,删除成功后页面却不会刷新,这要怎么解决啊?