I need to access the properties of a control that is nested in 2 datalists.
How do you use findcontrol method to do that?
what I have is like this:
<asp:datalist id="dlist" runat="server">
<edititemtempla te>
<asp:datalist id="dlistdet" runat="server">
<asp:dropdownli st id="ddlTypes" runat="server"> </dropdownlist>
</asp:datalist>
</edititemtemplat e>
</asp:datalist>
Every thing loads fine. The ddlTypes is loaded from a database and I
can see it's results. I need to access the selected value on it
directly. I am able to access a control from within the first dlist by
using:
neededitem = CType(e.Item.Fi ndControl("cont rolname"), TextBox)
But what is the syntax to drill down further into that edititemtemplat e
and the dlistdet? Also, I am running this from the event
SelectedIndexCh anged
on the dropdownlist, and I dont have the e.item.findcont rol. what I am
trying is something like this:
Dim ddl As DropDownList =
CType(dlist.Ite ms(dlist.Select edIndex).FindCo ntrol("ddlTypes "),
DropDownList)
But that isnt working. Not sure what it's supposed to look like.
Thank you for the assistance!
Greg Fischer
1st Byte Solutions
http://www.1stbyte.com