Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to find control bounded in item template on master page from content page?
    primarykey
    data
    text
    <p>I am having a nested repeater on the master page. And a hiddenfield in its item template. i want the value of hiddenfield on content page.Like this</p> <pre><code>&lt;ul class="categories"&gt; &lt;li&gt; &lt;div id='cssmenu'&gt; &lt;h4&gt;Categories&lt;/h4&gt; &lt;asp:Repeater ID="repcategory" runat="server" OnItemDataBound="repcategory_ItemDataBound"&gt; &lt;HeaderTemplate&gt; &lt;ul&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:HiddenField ID="hf1" Value='&lt;%# Eval("CategoryID") %&gt;' runat="server" /&gt; &lt;li class="active has-sub"&gt; &lt;a href='#'&gt;&lt;span&gt; &lt;%#Eval("CategoryName") %&gt;&lt;/span&gt;&lt;/a&gt; &lt;asp:Repeater ID="repsubcategory" OnItemDataBound="repsubcategory_ItemDataBound" runat="server"&gt; &lt;HeaderTemplate&gt; &lt;ul&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:HiddenField ID="hf2" Value='&lt;%# Eval("SubCategoryID") %&gt;' runat="server" /&gt; &lt;li class="has-sub"&gt; &lt;a href='#'&gt;&lt;span&gt; &lt;%#Eval("SubCategoryName") %&gt;&lt;/span&gt;&lt;/a&gt; &lt;asp:Repeater ID="repsubcategory2" runat="server"&gt; &lt;HeaderTemplate&gt; &lt;ul&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:HiddenField ID="hf3" Value='&lt;%# Eval("SubCategory2ID") %&gt;' runat="server" /&gt; &lt;li&gt; &lt;a href="ClientProductSubCategory2.aspx"&gt;&lt;span&gt; &lt;%#Eval("SubCategory2Name") %&gt;&lt;/span&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt; &lt;/ul&gt; &lt;/FooterTemplate&gt; &lt;/asp:Repeater&gt; &lt;/li&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt;&lt;/ul&gt;&lt;/FooterTemplate&gt; &lt;/asp:Repeater&gt; &lt;/li&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt;&lt;/ul&gt;&lt;/FooterTemplate&gt; &lt;/asp:Repeater&gt; &lt;/div&gt; </code></pre> <p>I want the value of subcategory2id on the content page and codded like this.</p> <pre><code> HiddenField hiddensubcategory2id = (HiddenField)Master.FindControl("hf3"); DataSet ds = new ClientProductView().GetAllProductSubCategory2(hiddensubcategory2id.Value); repContent.DataSource = ds; repContent.DataBind(); </code></pre> <p>But this is returning a null value. Please help me to solve this problem</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload