AjaxControlToolkit ModalPopup 实现模态窗口

Html代码:

 



    Untitled Page
   
   


   


   
   

   
            οnclick="btnViewMore_Click" />            Text="Button" οnclick="Button1_Click" />
       
           
               
                   

                       

                                                    οnclick="viewBox_OK_Click" />

                   

               
               
                   
               

           
           

       
       
       

   

   


 

 

C#代码:

 

public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
            }
        }

        protected void btnViewMore_Click(object sender, EventArgs e)
        {
           
        }

        private void InitDialog()
        {
            this.Label1.Text = "aaa";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            InitDialog();
            UpdatePanel1.Update();
            ModalPopupExtender1.Show();
        }

        protected void viewBox_OK_Click(object sender, EventArgs e)
        {
            ModalPopupExtender1.Hide();
        }
    }

你可能感兴趣的:(javascript,C#语言)