title: dynamic changed id of aspx textBox
body: <pre><code>txtRestaurantSearch.ID = "txtSearch";    
  TextBox textbox = (TextBox)Page.FindControl("txtSearch");
  </code></pre>
  
  <p>which is always null. How can i get value from dynamic changed id of aspx textBox</p>
  
  <p>whole code:</p>
  
  <pre><code>&lt;%@ Master Language="C#" MasterPageFile="~/MasterPages/HeaderFooter.Master" AutoEventWireup="true" 
      CodeBehind="Search.master.cs" Inherits="FoodOrder.MasterPages.Search" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="cplMPHead" runat="server"&gt;    
      &lt;asp:ContentPlaceHolder ID="cplMPHead" runat="server"&gt;
      &lt;/asp:ContentPlaceHolder&gt;  
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="cplMPBody" runat="server"&gt;
      &lt;asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"&gt;
      &lt;/asp:ScriptManagerProxy&gt;
      &lt;div class="search"&gt;
          &lt;ul class="tabs"&gt;
              &lt;li ID="liRestaurnat" runat="server"&gt;
                  &lt;asp:LinkButton ID="hlRestaurant" 
                      runat="server" CssClass="active" Text="Poišči restavracijo" 
                      ToolTip="Poišči po imenu restavracije" NavigateUrl="~/Default.aspx" 
                      onclick="hlRestaurant_Click" &gt;&lt;/asp:LinkButton&gt;
              &lt;/li&gt;
              &lt;li ID="liAddress" runat="server" class="second"&gt;
                  &lt;asp:LinkButton ID="hlAddress" 
                      runat="server" Text="Iskanje po krajih" ToolTip="Poišči po imenu kraja" 
                      NavigateUrl="~/Default.aspx" onclick="hlAddress_Click"&gt;&lt;/asp:LinkButton&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
          &lt;div class="search_place"&gt;  
              &lt;ul&gt;    
                  &lt;li&gt;
                      &lt;fieldset&gt;
                          &lt;asp:TextBox ID="txtRestaurantSearch" CssClass="input_big" runat="server" Text="" 
                              enableviewstate="true" ontextchanged="txtSearch_TextChanged" /&gt;
                      &lt;/fieldset&gt;
                  &lt;/li&gt;   
  </code></pre>