Empowering the ASP.Net Button Web Control, Confirm?...
2004-10-06 18:58
549 查看
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:.......
}
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:.......
}
相关文章推荐
- Web Server Controls->ASP.NET Button Control
- Web Server Controls->ASP.NET RadioButton Control
- ASP.NET - The Button Control
- Web Server Controls->ASP.NET ImageButton Control
- 《Hacking the Code ASP.NET Web Application Security》电子书下载
- Asp.Net 2.0 开发加速之 - Ilungasoft.Helper.Web.UI.MasterPage/Page/UserControl 精装版
- ASP.NET MVC - The view must derive from WebViewPage, or WebViewPage<TModel>
- 如何使用asp.net 1.1中的webcontrol中的TreeView
- ASP.NET - The Repeater Control
- Adding the Test API in The ASP.NET Web API Help Page
- ASP.NET: Custom AutoCompleteTextBox WebControl [With Source Code]
- NWebsec 1.0.3 The Security library for ASP.NET
- Web Server Controls->ASP.NET ListBox Control
- ASP.NET AJAX Roadmap--Getting Started (4): Introduction to the UpdatePanel Control
- Asp.net Web Crop Image Control asp.net控件和jquery 自定义的一个截图控件
- ASP.NET 的 WebControl.Attributes 属性
- 设置页面的默认焦点控件和默认接受事件控件How Do I Set the DefaultFocus or DefaultButton in a Page Based on a Master Page in ASP.NET 2.0
- 用jQuery访问ASP.Net WebControl的ClientID方法
- AjaxControlToolkit 微软出的ajax.net 工具使用教程五 ConfirmButtonExtender(确认)控件的使用
- Web Control开发随笔(2):ASP.NET 控件生命周期