如何在服务器端执行js
protected void btnEdit_Click(object sender, EventArgs e)
{
PublicMethods.ShowMessageBox(this, "成功!!");
}
public static void ShowMessageBox(Page page, string message)
public static void ShowMessageBox(Page page, string message)
{
string script = "<script language='javascript' type='text/javascript' >window.alert('" + message + "');</script>";
page.ClientScript.RegisterStartupScript(page.GetType(), "ShowMessageBox", script);
}