confirm()对话框在.net的button中的使用,下拉日期Calendar的使用

1,confirm()在.net的button中的使用。
    (1)对System.Web.UI.WebControls.Button button3控件
        因为它的click事件是服务器端的,首先在服务器端给button绑上客户端的事件,代码是:
        this.Button3.Attributes.Add("onclick","return confirm('aa')");
        如此即可
    (2)对protected Infragistics.WebUI.WebDataInput.WebImageButton WebImageButton2;
        需要在客户端给click事件加上WebImageButton2_Click方法,该方法代码:
        function WebImageButton2_Click(oButton, oEvent)
        { //Add code to handle your event here. 
            if(!confirm("dddd")) 
                oEvent.needPostBack=false;
            else
                 oEvent.needPostBack=true; 
        } 
2,对该protected Infragistics.WebUI.WebDataInput.WebDateTimeEdit idteDateTime;  控件的使用
        效果就是在单击右侧按钮后,出现protected Infragistics.WebUI.WebSchedule.WebCalendar SharedCalendar;控件,即下拉的时间表;这主要是客户端的代码,如下:
        //建立一个protected Infragistics.WebUI.WebDataInput.WebDateTimeEdit idteDateTime; 控件
         


        //建立一个protected Infragistics.WebUI.WebSchedule.WebCalendar SharedCalendar;控件 
       
        //调用 javascript 语句
       

你可能感兴趣的:(confirm()对话框在.net的button中的使用,下拉日期Calendar的使用)