这个错误怎么改正啊?我页面用了updatepanel上放了个repeater,在repeater的intemcommand中写了个删除的方法,然后提示删除成功或者失败,我的提示是javascriptHelper类
/// <summary>
/// 弹出JavaScript小窗口,提示操作成功
/// 用于有updatepanel的页面中,不需要跳转
/// </summary>
public static void Alert()
{
System.Web.HttpContext.Current.Response.Write("<script language=\"javascript\">alert(\"温馨提示,操作成功\");</script>");
}
这是类中的方法,错在哪里 啊?
/// <summary>
/// 弹出JavaScript小窗口,提示操作成功
/// 用于有updatepanel的页面中,不需要跳转
/// </summary>
public static void Alert()
{
System.Web.HttpContext.Current.Response.Write("<script language=\"javascript\">alert(\"温馨提示,操作成功\");</script>");
}
这是类中的方法,错在哪里 啊?
我把代码修改了一下
/// <summary>
/// 弹出JavaScript小窗口,提示操作成功
/// 用于有updatepanel的页面中,不需要跳转
/// </summary>
public static void Alert(Page page,Type type,bool isajax)
{
if (isajax)
{
ScriptManager.RegisterClientScriptBlock(page, type, "", "alert('温馨提示,操作成功!');", true);
}
else
{
System.Web.HttpContext.Current.Response.Write("<script language=\"javascript\">alert(\"温馨提示,操作成功!\");</script>");
}
}
然后穿参数调用就正确了
http://www.800cy.com