2012年10月11日 星期四

response.write 问题 - .NET技术 / ASP.NET

http://dotnet.ygman.com/thread/248764
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
  {
  if (0 == RebootAXIS(MachineIp.Ip))
  {
  //MessageBox.Show("Reboot successfully.");
  Page.ClientScript.RegisterStartupScript(Page.GetType(), "ks", "alert('Reboot successfully.')", true);
  }
  else
  {
  Page.ClientScript.RegisterStartupScript(Page.GetType(), "ks", "alert('Failed to reboot the DVS.')", true);
  }

http://e-stickynotes.blogspot.tw/2010/04/aspnet-messagebox.html



ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "test", "alert('保存成功!');", true);