title: How to populate a textbox based on the selected value of a dropdown list in an asp.net c# web forms application?
body: <p>I have a dropdown list (doc_rvw_sub_recip_list) that is populated with names from tbl_ad_users.  tbl_ad_users contains a field titled "domain_user".  I would like to populate an asp:hiddenfield (hdn_domain_user) with the "domain_user" based on the selected value in the doc_rvw_sub_recip_list dropdown list.  For testing I used a dropdown list (domain_user_ddl) instead of a hidden field, and it works as needed.  But I don't know how to get the value into a hidden field as opposed to using a dropdown list.</p>
  
  <p>The following is doc_rvw_sub_recip_list:</p>
  
  <pre><code>&lt;asp:DropDownList ID="doc_rvw_sub_recip_list" runat="server" DataSourceID="sdc_ad_user_list" DataTextField="name" DataValueField="email_address" AppendDataBoundItems="true" AutoPostBack="true"&gt;&lt;asp:ListItem Value=""&gt;Please Select&lt;/asp:ListItem&gt;&lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>The following is the sql data source for domain_user_ddl:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="sdc_domain_user_ddl" runat="server" ConnectionString='&lt;%$ ConnectionStrings:idrfConnectionString %&gt;' SelectCommand="SELECT [domain_user] FROM [tbl_ad_users] WHERE ([email_address] = @email_address)"&gt;
              &lt;SelectParameters&gt;
                  &lt;asp:ControlParameter ControlID="doc_rvw_sub_recip_list" PropertyName="SelectedValue" Name="email_address" Type="String"&gt;&lt;/asp:ControlParameter&gt;
              &lt;/SelectParameters&gt;
          &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>The following is domain_user_ddl:</p>
  
  <pre><code>&lt;asp:DropDownList ID="domain_user_ddl" runat="server" DataSourceID="sdc_domain_user_ddl" DataTextField="domain_user" DataValueField="domain_user" AutoPostBack="true"&gt;&lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>How do I get this to work for hdn_domain_user just as it works for domain_user_ddl?</p>