title: Accessing a StaticItemTemplate control from a MenuItem
body: <p>I've written the following menu:</p>
  
  <pre><code>&lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"&gt;  
    &lt;Items&gt;  
      &lt;asp:MenuItem NavigateUrl="javascript:SetRoadMap();" Text="Road Map" Value="SetRoadMap"/&gt;  
      &lt;asp:MenuItem NavigateUrl="javascript:SetHybridMap();" Text="Hybrid Map" Value="SetHybridMap" /&gt;  
      &lt;asp:MenuItem NavigateUrl="javascript:SearchAddress(document.getElementById('addressToSearch').text);" Text="Search Address" Value="searchAddress" /&gt;  
    &lt;/Items&gt;  
    &lt;StaticItemTemplate&gt;  
      &lt;asp:Label runat="server" Height="20px" Text='&lt;%# Eval("Text") %&gt;' /&gt;  
      &lt;asp:TextBox ID="addressToSearch" runat="server" Height="15px" Width="250px" Visible='&lt;%# ((string)Eval("Value") == "searchAddress") %&gt;' /&gt;  
    &lt;/StaticItemTemplate&gt;  
  &lt;/asp:Menu&gt;
  </code></pre>
  
  <p>The SearchAddress menu item's URL can't seems to find the text box (id 'addressToSearch') attached to it.  </p>
  
  <p>Any advice will be welcome.</p>