title: modal popup in asp.net
body: <p>i am using model popup in asp.net on this linkbutton</p>
  
  <pre><code>&lt;asp:LinkButton ID="LinkButton1" runat="server"  CssClass="addProduct-disable" Enabled ="false" Text="Assign Filter Criteria"  CausesValidation="true"                    &gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>when i click a button in popup the event is getting fired but the asp panel and label are not getting displayed</p>
  
  <pre><code>&lt;table cellpadding="0" cellspacing="0" width="100%"&gt;
                  &lt;tr&gt;
                      &lt;td colspan="3" class="style3" align="center"&gt;
                          Assign Filtering Criteria
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan="3"&gt;
                          &amp;nbsp;
                          &lt;asp:Label ID="lblSuccess" runat="server" Text="" &gt;&lt;/asp:Label&gt;    
  
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td class="logText" width="30%"&gt;
                          Filter:
                          &lt;asp:ImageButton ID="imgFilter" runat="server" ImageUrl="../images/helpIcon.png"
                              border="0" CausesValidation="false" OnClientClick="return showHelp('ctl00_ContentPlaceHolder1_pnlFilterHelp');" /&gt;
                          &lt;cc1:ModalPopupExtender ID="mdlFilter" runat="server" TargetControlID="imgFilter"
                              PopupControlID="pnlFilterHelp" DropShadow="false" CancelControlID="lnkFilterCancel"
                              X="410" Y="200" /&gt;
                          &lt;asp:Panel ID="pnlFilterHelp" runat="server" Height="70px" Width="170px" Style="display: none;"&gt;
                              &lt;asp:Panel ID="pnlFilterOuter" runat="server" CssClass="modalPopup2" Height="100px"
                                  Width="180px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="#FFFCF9"&gt;
                                  &lt;table cellpadding="0" cellspacing="0" width="90%"&gt;
                                      &lt;tr&gt;
                                          &lt;td align="center" valign="middle" style="padding-top: 15px; padding-left: 5px;"&gt;
                                              &lt;table cellpadding="0" align="center" cellspacing="0" width="100%" height="40px"&gt;
                                                  &lt;tr&gt;
                                                      &lt;td class="style8"&gt;
                                                          Set Filter Criteria so that customer can easily search product.
                                                      &lt;/td&gt;
                                                  &lt;/tr&gt;
                                              &lt;/table&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                      &lt;tr&gt;
                                          &lt;td&gt;
                                              &amp;nbsp;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                      &lt;tr&gt;
                                          &lt;td style="padding-left: 20px;"&gt;
                                              &lt;asp:LinkButton ID="lnkFilterCancel" runat="server" Text="" CssClass="gridPagerlink"
                                                  ForeColor="Black"&gt;Close &lt;b&gt;X&lt;/b&gt;&lt;/asp:LinkButton&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                  &lt;/table&gt;
                              &lt;/asp:Panel&gt;
                          &lt;/asp:Panel&gt;
                      &lt;/td&gt;
                      &lt;td width="4px"&gt;
                      &lt;/td&gt;
                      &lt;td class="logBox"&gt;
                          &lt;asp:UpdatePanel ID="filter" runat="server"&gt;
                              &lt;ContentTemplate&gt;
                                  &lt;asp:DropDownList ID="drpFilter" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpFilter_SelectedIndexChanged"
                                      Width="150px"&gt;
                                  &lt;/asp:DropDownList&gt;
                              &lt;/ContentTemplate&gt;
                          &lt;/asp:UpdatePanel&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan="3"&gt;
                          &amp;nbsp;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td class="logText"&gt;
                          Filter Option:
                          &lt;asp:ImageButton ID="imgFilterOption" runat="server" ImageUrl="../images/helpIcon.png"
                              border="0" CausesValidation="false" OnClientClick="return showHelp('ctl00_ContentPlaceHolder1_pnlFilterOption');" /&gt;
                          &lt;cc1:ModalPopupExtender ID="mdlFilterOption" runat="server" TargetControlID="imgFilterOption"
                              PopupControlID="pnlFilterOption" DropShadow="false" CancelControlID="lnkFilterOptionCancel"
                              X="410" Y="220" /&gt;
                          &lt;asp:Panel ID="pnlFilterOption" runat="server" Height="70px" Width="170px" Style="display: none;"&gt;
                              &lt;asp:Panel ID="pnlFilterOptionOuter" runat="server" CssClass="modalPopup2" Height="300px"
                                  Width="580px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="#FFFCF9"&gt;
                                  &lt;table cellpadding="0" cellspacing="0" width="90%"&gt;
                                      &lt;tr&gt;
                                          &lt;td align="center" valign="middle" style="padding-top: 15px; padding-left: 5px;"&gt;
                                              &lt;table cellpadding="0" align="center" cellspacing="0" width="100%" height="40px"&gt;
                                                  &lt;tr&gt;
                                                      &lt;td class="style8"&gt;
                                                          Set Filter Criteria Option so that customer can easily search product.
                                                      &lt;/td&gt;
                                                  &lt;/tr&gt;
                                              &lt;/table&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                      &lt;tr&gt;
                                          &lt;td&gt;
                                              &amp;nbsp;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                      &lt;tr&gt;
                                          &lt;td style="padding-left: 20px;"&gt;
                                              &lt;asp:LinkButton ID="lnkFilterOptionCancel" runat="server" Text="" CssClass="gridPagerlink"
                                                  ForeColor="Black"&gt;Close &lt;b&gt;X&lt;/b&gt;&lt;/asp:LinkButton&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                  &lt;/table&gt;
                              &lt;/asp:Panel&gt;
                          &lt;/asp:Panel&gt;
                      &lt;/td&gt;
                      &lt;td width="4px"&gt;
                      &lt;/td&gt;
                      &lt;td class="logBox"&gt;
                          &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
                              &lt;ContentTemplate&gt;
                                  &lt;asp:DropDownList ID="drpFilterOption" runat="server" Width="150px" Enabled="false"&gt;
                                  &lt;/asp:DropDownList&gt;
                              &lt;/ContentTemplate&gt;
                          &lt;/asp:UpdatePanel&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan="3"&gt;
                          &amp;nbsp;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td class="logText"&gt;
                          &amp;nbsp;
                      &lt;/td&gt;
                      &lt;td width="4px"&gt;
                      &lt;/td&gt;
                      &lt;td class="logBox"&gt;
                          &amp;nbsp;
                          &lt;asp:UpdatePanel ID="cancel" runat="server"&gt;
                              &lt;ContentTemplate&gt;
                                  &lt;asp:Button ID="btnAdd" runat="server" Style="font-weight: 700; text-align: right"
                                      Text="Add" CssClass="Login-btn" OnClick="btnAdd_Click" /&gt;
                              &lt;/ContentTemplate&gt;
                          &lt;/asp:UpdatePanel&gt;
  
              &lt;/td&gt; &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &amp;nbsp;&amp;nbsp;
                  &lt;/td&gt;
                  &lt;td colspan="2"&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="center" colspan="3"&gt;
                      &lt;asp:Panel ID="pnlAddFilter" runat="server" style="display:none"&gt;
                          &lt;table id="list"&gt;
                          &lt;/table&gt;
                          &lt;div id="pager" style="text-align: center;"&gt;
                          &lt;/div&gt;
                          &lt;br /&gt;
                        &lt;/asp:Panel&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &amp;nbsp;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
  
              &lt;/tr&gt;
              &lt;/table&gt;
  </code></pre>
  
  <p>event is</p>
  
  <pre><code>protected void btnAdd_Click(object sender, EventArgs e)
      {
          pnlAddFilter.Style.Add("display", "block");
          //pnlAddFilter.Visible = true;
          DataTable dtFilter = new DataTable();
          dtFilter.Columns.Add("FOId");
          dtFilter.Columns.Add("Filtername");
          dtFilter.Columns.Add("FilterOption");
          DataRow drFilter;
          if (Session["Filter"] != null)
          {
              dtFilter = (DataTable)Session["Filter"];
          }
  
          drFilter = dtFilter.NewRow();
          drFilter["FOId"] = drpFilterOption.SelectedValue;
          drFilter["Filtername"] = drpFilter.SelectedItem.Text;
          drFilter["FilterOption"] = drpFilterOption.SelectedItem.Text;
          dtFilter.Rows.Add(drFilter);
          Session["Filter"] = dtFilter;
          btnAdd.Enabled = false;
          if (Session["Filter"] == null)
          {
            //  pnlAddFilter.Visible = false;
              pnlAddFilter.Style.Add("display", "none");
          }
          else
          {
              pnlAddFilter.Style.Add("display", "block");
            //  pnlAddFilter.Visible = true;
          }
          lblSuccess.Visible = true;
          lblSuccess.Text = AppHardcodeValue.strAddFilterProduct; 
      }      
  </code></pre>