title: GridView Not binding in ASP and C# using Oracle DB
body: <p>I have a button, <code>onClick</code> event, I want to load data from Oracle DB to the <code>GridView</code> inside the <code>ModalPopupExtender</code>. </p>
  
  <p><strong>The issue is that the Modalpopup is displaying but there is no data loads in the gridView.</strong> </p>
  
  <p>Can anyone guide me where I did mistake.</p>
  
  <p><strong>ASP Code</strong></p>
  
  <pre><code>     &lt;asp:Label ID="dummyLabel" runat="server" /&gt;
                      &lt;ajax:ModalPopupExtender ID="mpeServiceType" runat="server" TargetControlID="dummyLabel" CancelControlID="BtnCloseServiceTypeMPE" Drag="true" PopupControlID="pnlServiceType" Enabled="True" &gt;
                      &lt;/ajax:ModalPopupExtender&gt;
   &lt;asp:Button runat="server" ID="btnSelectServiceType" Text="Select Srv Type" OnClick="btnSelectServiceType_Click" /&gt;   
        &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="conditional" ChildrenAsTriggers="true"&gt;
                  &lt;ContentTemplate&gt;
                      &lt;asp:Button ID="Button2" Style="display: none" runat="server" Width="120" Text="Filter Charges" ToolTip="show Chargefilter-Dialog" /&gt;
                      &lt;asp:Button ClientIDMode="Static" ID="BtnCloseServiceTypeMPE" Text="Close" ToolTip="close filter-dialog" CausesValidation="false" Width="150px" runat="server" /&gt;&lt;br /&gt;
                      &lt;table border="1"&gt;
                          &lt;tr&gt;
                              &lt;td dir="rtl"&gt;
                                   &lt;asp:GridView ID="gvServiceType" runat="server" 
  
  CssClass="mGrid" AlternatingRowStyle-CssClass="alt" DataKeyNames="APP_ID,SRV_TYPE"
  
   AutoGenerateColumns="False" OnSelectedIndexChanged="gvServiceType_SelectedIndexChanged"&gt;
                                        &lt;Columns&gt;
                                          &lt;asp:BoundField DataField="APP_ID" HeaderText=(APP_ID)" ReadOnly="True" SortExpression="APP_ID" /&gt;
                                          &lt;asp:BoundField DataField="SRV_TYPE" HeaderText="SRV_TYPE)" SortExpression="SRV_TYPE" ReadOnly="True" /&gt;
                                          &lt;asp:BoundField DataField="SRV_NAME" HeaderText="SRV_NAME)" SortExpression="SRV_NAME" /&gt;
                                          &lt;asp:TemplateField HeaderText="Select"&gt;
                                              &lt;ItemTemplate&gt;
                                                  &lt;asp:Button ID="btnSelect" runat="server" CommandName="Select" Text="Select" /&gt;
                                              &lt;/ItemTemplate&gt;
                                          &lt;/asp:TemplateField&gt;
                                      &lt;/Columns&gt;
                                        &lt;/asp:GridView&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/ContentTemplate&gt;
                  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p><strong>C# Code</strong></p>
  
  <pre><code> protected void btnSelectServiceType_Click(object sender, EventArgs e)
          {
              string strSQLconnection = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.24)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=PROD)));User Id=aaziz;Password=32145;";
              OracleConnection conn = new OracleConnection(strSQLconnection);
              OracleCommand sqlCommand = new OracleCommand("select * from INCOME.srv_types where APP_ID='3' AND SRV_TYPE='8'", conn);
              conn.Open();
              OracleDataReader reader = sqlCommand.ExecuteReader();
              gvServiceType.DataSource = reader;
              gvServiceType.DataBind();
              mpeServiceType.Show();
  }
  </code></pre>