title: How to use a PopupControlExtender to popup an ASP.NET control other than a PANEL?
body: <p>The PopupControlExtender can popup many ASP.NET controls, but only examples popup a <strong>panel</strong> can be found on Internet... 
  How to popup other controls such as a gridview?</p>
  
  <p>e.g. I am going to get a DataTable from database by MachineNo and set the DataTable as the datasource of GridView2. Then I want to popup GridView2 that displaying the information of that Machine when mouse is over the imagebutton.
  How to write the code behind?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;asp:GridView ID="GridView1" ...onrowcreated="GridView1_RowCreated"&gt;
  &lt;Columns&gt;
    &lt;asp:BoundField HeaderText="MachineNo" DataField="MachineNo"/&gt;
    &lt;asp:TemplateField&gt;
      &lt;ItemTemplate&gt;
        &lt;asp:ImageButton ID="ImageButton1" .../&gt;
        &lt;cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" 
             PopupControlID="GridView2" 
             TargetControlID="ImageButtonl" 
             DynamicContextKey='&lt;%# Eval("MachineNo") %&gt;' 
             DynamicControlID="GridView2" 
             DynamicServiceMethod="GetDynamicContent" ???&gt;
        &lt;/cc1:PopupControlExtender&gt;
      &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
  &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  
  &lt;asp:GridView ID="GridView2" ...&gt;...</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e){
  if (e.Row.RowType == DataControlRowType.DataRow)
  {
      PopupControlExtender PopupControlExtender1 = (PopupControlExtender)e.Row.FindControl("PopupControlExtender1");
      string behaviorID = "PopupControlExtender1_" + e.Row.RowIndex;
      PopupControlExtender1.BehaviorID = behaviorID;
      ImageButton ImageButton1 = (ImageButton)e.Row.FindControl("ImageButton1");
  
      string OnMouseOverScript = string.Format("$find('{0}').showPopup();", behaviorID);
      string OnMouseOutScript = string.Format("$find('{0}').hidePopup();", behaviorID);
  
      ImageButton1.Attributes.Add("onmouseover", OnMouseOverScript);
      ImageButton1.Attributes.Add("onmouseout", OnMouseOutScript);
  }}
  </code></pre>