here is my dyanamic method code -

string sSQLString = "SELECT  * from VIEW_ALLOCATION";
             
            

        dtValue = SQLInterFace.ExecuteDataSet(m_dbase.cnnConnection, sSQLString).Tables[0];

        StringBuilder b = new StringBuilder();

        b.Append("
");
        b.Append("");
        for (int i = 0; i < dtValue.Rows.Count; i++)
        {
            //b.Append("");
            //b.Append("");
            //b.Append("");

            b.Append("");
            b.Append("");
            b.Append("");
        }
        b.Append("
");
        b.Append("C. Heads

').style.display == 'block')' />");
        b.Append("
Unit PriceStockDescription
" + dtValue.Rows[i][Constant.GLHEAD_V].ToString() + "
");

        return b.ToString();

here is my html code. I m using grid. Inside the grid i have a image button. When i click on that button pop up appears. I want to close that pop up from Button1 which i m using in dynamic service method.

 
                                       
                                       
                                           
                                               
                                                   
                                                   
                                               
                                           

                                                                                                                    Height="16" ImageUrl="~/CSS/images/Information.png" ToolTip="Click for C.Head"
                                                            Width="16" />
                                                   

                                                                                                                    Font-Size="8pt" TEXT='<%# BIND("GLHead_V") %>' />
                                                            
      
       
                                                                                                                   DynamicContextKey='<%# Eval("SubGroupCode_N") %>' DynamicControlID="Panel1"
                                                            DynamicServiceMethod="GetDynamicContent" PopupControlID="Panel1"
                                                            Position="Bottom" TargetControlID="imgSubGroup">
                                                       

                                                                                                
                                                   

                                       

                                                                                    Wrap="False" Width="25%" />
                                       
                                   


-----And my panel is outside the grid--

 
       
       

------i want to close this panel on click of button1--