编程语言

img hiyaolee

Empowering the ASP.Net Button Web Control, Confirm?...

发表于2004/10/6 18:58:00  828人阅读

分类: C# And ASP.NET

1.彈出警示對話框
  private void btnEdit_Click(object sender, System.EventArgs e)
  {
     Page.RegisterStartupScript("Startup", "<Script Language=JavaScript> alert('" +"warning!" + "') </Script>");
  }
2.彈出確定/取消對話框
  private void Page_Load(object sender, System.EventArgs e)
  {
       if(!IsPostBack)
       {
          btnDone.Attributes.Add("onclick","return confirm(/""+"Continue?"+"/");");
        }
  }

  private void btnDone_Click(object sender, System.EventArgs e)
  {
      //ToDo:.......
   }

 


 

阅读全文
0 0

相关文章推荐

img
取 消
img