方法一:
1.在InitializeComponent中添加句柄    
    
    
private void InitializeComponent()
        
{    
            
this.Button1.PreRender += new System.EventHandler(this.Button1_PreRender);

        }

    
    
2.加入句柄响应    
    
private void Button1_PreRender(object sender, System.EventArgs e)
        
{
            
this.Button1.Attributes.Add("onclick","return confirm('确定要删除吗?');");  
        }

方法二:
this.LinkButton.Attributes.Add("OnClick","javascript:return confirm('您确定要删除吗?')") 
posted on 2008-07-03 13:50  apple  阅读(150)  评论(0)    收藏  举报