title: Pass gridview items to textbox and dropdown list inside of Jquery UI?
body: <p>Is there a way to pass value of selected row in gridview to a textbox and dropdownlist inside a jQueryUI dialog? I was able to pass the value in labels but I want it to be in textbox and dropdownlist. This is my code to pass the value to labels:</p>
  
  <pre><code>var prm = Sys.WebForms.PageRequestManager.getInstance();
  $(document).on("click", "[id*=LinkButton1]", function () {
      $("[id*=lblNameView]").html($(".name", $(this).closest("tr")).html());
      $("[id*=lblLocationView]").html($(".Locationd", $(this).closest("tr")).html());
      var dlg = jQuery("#dialogViewing").dialog({
          modal: true,
          title: "View Audit Findings",
          resizable: true,
          width: 480,
          height: 290,
          show: {
              effect: "blind",
              duration: 200
          },
          hide: {
              effect: "blind",
              duration: 200
          },
      });
      return false;
     dlg.parent().appendTo(jQuery("form:first"));
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;Columns&gt;
      &lt;asp:BoundField DataField="name" ItemStyle-CssClass="name" HeaderText="Tenant Name" SortExpression="TenantCode" /&gt;
      &lt;asp:BoundField DataField="Locationd" ItemStyle-CssClass="Locationd" HeaderText="Location" SortExpression="Locationd" /&gt;
      &lt;asp:TemplateField&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:LinkButton ID="LinkButton1" runat="server"&gt;LinkButton&lt;/asp:LinkButton&gt;
          &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  &lt;/Columns&gt;
  </code></pre>
  
  <p>Update:</p>
  
  <pre><code>    &lt;div id="dialogViewing" style="display:none;"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;asp:TextBox ID="lblName" runat="server"&gt;&lt;/asp:TextBox&gt;  
            &lt;asp:DropDownList ID="ddlLocation" runat="server"&gt;
              &lt;asp:ListItem&gt;Location 1&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Location 2&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Location 3&lt;/asp:ListItem&gt;
               &lt;/asp:DropDownList&gt;
           &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/div&gt;
  </code></pre>