title: How to get Id at Server Side for controls inside PlaceHolder in Asp.Net Web Application?
body: <p>I'm working on asp.net web application. I'm dynamically creating controls in one page using placeholder ans user control. inside placeholder there are multiple textboxes. </p>
  
  <p>I'm running this code in a for loop.</p>
  
  <pre><code>phSchemaEMITenureDetails.Controls.Add(LoadControl("~/UserControl/SchemaEMITenureDetails.ascx"));
  </code></pre>
  
  <p>means, I want to create multiple sets of these textboxes.</p>
  
  <p>All is working fine, but now I want to get the text data entered by the user in these textboxes at server side. So I need Id of these controls at server side. </p>
  
  <p>I'm not able to get that. Please help me out </p>
  
  <p>User Control:</p>
  
  <pre><code>    &lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SchemaEMITenureDetails.ascx.cs" Inherits="PaymentControllerGUI.SchemaEMITenureDetails" %&gt;
  &lt;asp:Label runat="server" ID="SchemaRowName"&gt;&lt;/asp:Label&gt;
  &lt;asp:Table runat="server"&gt;
      &lt;asp:TableRow runat="server" ID="SchemaEMITenure03MonthRow" Style="display: none;"&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:Label runat="server" Text="EMI 03 Months" ID="SchemaEMITenure03MonthLabel"&gt;
              &lt;/asp:Label&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell&gt;
  &lt;asp:TextBox runat="server" ID="SchemaEMITenure03MonthTextBox"&gt;
  &lt;/asp:TextBox&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
  
      &lt;asp:TableRow runat="server" ID="SchemaEMITenure06MonthRow" Style="display: none;"&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:Label runat="server" Text="EMI 06 Months" ID="SchemaEMITenure06MonthLabel"&gt;
              &lt;/asp:Label&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:TextBox ID="SchemaEMITenure06MonthTextBox" runat="server"&gt;
              &lt;/asp:TextBox&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
  
      &lt;asp:TableRow runat="server" ID="SchemaEMITenure09MonthRow" Style="display: none;"&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:Label runat="server" Text="EMI 09 Months" ID="SchemaEMITenure09MonthLabel"&gt;
  
              &lt;/asp:Label&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:TextBox ID="SchemaEMITenure09MonthTextBox" runat="server"&gt;
              &lt;/asp:TextBox&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
  
      &lt;asp:TableRow runat="server" ID="SchemaEMITenure12MonthRow" Style="display: none;"&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:Label runat="server" Text="EMI 12 Months" ID="SchemaEMITenure12MonthLabel"&gt;
              &lt;/asp:Label&gt;
          &lt;/asp:TableCell&gt;
          &lt;asp:TableCell&gt;
              &lt;asp:TextBox ID="SchemaEMITenure12MonthTextBox" runat="server"&gt;
              &lt;/asp:TextBox&gt;
          &lt;/asp:TableCell&gt;
      &lt;/asp:TableRow&gt;
  
  &lt;/asp:Table&gt;
  </code></pre>
  
  <p>Page Aspx:</p>
  
  <pre><code>&lt;asp:PlaceHolder ID="phSchemaEMITenureDetails" runat="server"&gt;&lt;/asp:PlaceHolder&gt;
  </code></pre>
  
  <p>Page Aspx.cs: <code>phSchemaEMITenureDetails.Controls.Add(LoadControl("~/UserControl/SchemaEMITenureDetails.ascx"));</code></p>