Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
How do we access controls in the template of a WebDataMenu?
posted

Hi there,

I've got a WebDataMenu setup (moving over from ultrawebtoolbar), and I'm having some issues accessing a control (a DropDown List) in my template. My template is defined like this

<ig:ItemTemplate ID="tpDropDown" runat="server" TemplateID="tpDropDown">
<Template>
<asp:DropDownList AutoPostBack="true" ID="ddlTBAddNew" runat="server">
<asp:ListItem Value="" Text="Actions.." />
</asp:DropDownList>
</Template>
</ig:ItemTemplate>

But No matter what I try server-side I cannot acess that ddlTBAddNew

I can get as far as the Template control using mymenu.Templates[0].Template but within that there's no .Controls collection, no .FindControl or any way I can see to access my DropDownList. So how do we access controls in a template please? Calling .FindControl at the Templates[0] level doesn't return anything at all. So I'm at a loss as to what to try next? 

If you expect people to upgrade to this control from ultrawebtoolbar, the least you could do is provide some examples & documentation on how to do so!

Thanks in advance