title: How to open popup window with order details while order no from listview clicked in ASP
body: <p><a href="https://i.stack.imgur.com/DSpzr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DSpzr.png" alt="sample Image" /></a>I have a list of Orders listed in ListView and have button placed on each row.</p>
  <p>Need to open a model popup window on button click with products related to that particular order from database, I have done the design using bootstrap and the data loading in the Customer list view.</p>
  <p>I'm not sure how to pass values to the model popup defined on the same page from the list view.</p>
  <p>I'm using a gridview inside the model popup to display the child table data.</p>
  <p>Below is the code I'm working on..</p>
  <h2>ASPX</h2>
  <pre><code>  &lt;div&gt;
      &lt;asp:ListView ID=&quot;lvCustomers&quot; runat=&quot;server&quot; GroupPlaceholderID=&quot;groupPlaceHolder1&quot; ItemPlaceholderID=&quot;itemPlaceHolder1&quot;
          OnPagePropertiesChanging=&quot;OnPagePropertiesChanging&quot;&gt;
          &lt;LayoutTemplate&gt;
              &lt;table id=&quot;product-master&quot; class=&quot;table table-bordered table-striped&quot;&gt;
                  &lt;tr&gt;
                      &lt;th&gt;OrderNo&lt;/th&gt;
                      &lt;th&gt;Name&lt;/th&gt;
                      &lt;th&gt;Email&lt;/th&gt;
                      &lt;th&gt;Date&lt;/th&gt;
                      &lt;th&gt;Amount&lt;/th&gt;
                      &lt;th&gt;Status&lt;/th&gt;
                      &lt;th&gt;&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;asp:PlaceHolder runat=&quot;server&quot; ID=&quot;groupPlaceHolder1&quot;&gt;&lt;/asp:PlaceHolder&gt;
                  &lt;tr&gt;
                      &lt;td colspan=&quot;3&quot;&gt;
  
                          &lt;asp:DataPager ID=&quot;DataPager1&quot; runat=&quot;server&quot; PagedControlID=&quot;lvCustomers&quot; PageSize=&quot;10&quot;&gt;
                              &lt;Fields&gt;
                                  &lt;asp:NextPreviousPagerField ButtonType=&quot;Link&quot; ShowFirstPageButton=&quot;false&quot; ShowPreviousPageButton=&quot;true&quot;
                                      ShowNextPageButton=&quot;false&quot; /&gt;
                                  &lt;asp:NumericPagerField ButtonType=&quot;Link&quot; /&gt;
                                  &lt;asp:NextPreviousPagerField ButtonType=&quot;Link&quot; ShowNextPageButton=&quot;true&quot; ShowLastPageButton=&quot;false&quot;
                                      ShowPreviousPageButton=&quot;false&quot; /&gt;
                              &lt;/Fields&gt;
                          &lt;/asp:DataPager&gt;
  
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/LayoutTemplate&gt;
  
          &lt;GroupTemplate&gt;
              &lt;tr&gt;
                  &lt;asp:PlaceHolder runat=&quot;server&quot; ID=&quot;itemPlaceHolder1&quot;&gt;&lt;/asp:PlaceHolder&gt;
              &lt;/tr&gt;
          &lt;/GroupTemplate&gt;
  
          &lt;ItemTemplate&gt;
              &lt;td&gt;&lt;%# Eval(&quot;OrderNo&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;&lt;%# Eval(&quot;Name&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;&lt;%# Eval(&quot;Email&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;&lt;%# Eval(&quot;Date&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;&lt;%# Eval(&quot;Amount&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;&lt;%# Eval(&quot;Status&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-flat&quot; data-toggle=&quot;modal&quot; data-target=&quot;#myModal&quot;&gt;Pick&lt;/button&gt;&lt;/td&gt;
          &lt;/ItemTemplate&gt;
  
      &lt;/asp:ListView&gt;
  &lt;/div&gt;
  &lt;div class=&quot;modal fade modal-primary&quot; id=&quot;myModal&quot; role=&quot;dialog&quot;&gt;
      &lt;div class=&quot;modal-dialog&quot;&gt;
  
          &lt;!-- Modal content--&gt;
          &lt;div class=&quot;modal-content&quot;&gt;
              &lt;div class=&quot;modal-header&quot;&gt;
                  &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;
                      &lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
  
                  &lt;h4 class=&quot;modal-title&quot;&gt;Products List&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class=&quot;modal-body&quot;&gt;
                  &lt;div class=&quot;box-body table-responsive no-padding&quot;&gt;
  
                      &lt;table class=&quot;table table-hover&quot;&gt;
                          &lt;tr&gt;
                              &lt;th&gt;ORDER #&lt;/th&gt;
                              &lt;th&gt;Bin Loc&lt;/th&gt;
                              &lt;th&gt;Product Name&lt;/th&gt;
                              &lt;th&gt;Gramage&lt;/th&gt;
                              &lt;th&gt;Quantity&lt;/th&gt;
                              &lt;th&gt;Scan&lt;/th&gt;
                          &lt;/tr&gt;
                          
                          &lt;tr&gt;
                              &lt;td&gt;65489&lt;/td&gt;
                              &lt;td&gt;A14&lt;/td&gt;
                              &lt;td&gt;RRRR&lt;/td&gt;
                              &lt;td&gt;200&lt;/td&gt;
                              &lt;td&gt;5&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;asp:TextBox ID=&quot;TextBox4&quot; class=&quot;form-control input-sm&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
  
                  &lt;/div&gt;
                  &lt;!-- /.box-body --&gt;
              &lt;/div&gt;
              &lt;div class=&quot;modal-footer&quot;&gt;
                  &lt;button type=&quot;button&quot; class=&quot;btn btn-default pull-left&quot; data-dismiss=&quot;modal&quot;&gt;Done&lt;/button&gt;
                  &lt;button type=&quot;button&quot; class=&quot;btn btn-outline pull-right&quot;&gt;Save changes&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>