aspx thread: Editing controls in a DataList control from an event handler...
I have a DataList, inside of it I have a button. When the user clicks on the
button, a DropDownList in the DataList is supposed to be populated. However,
I can't figure it out.
The button is <asp:button id="fillOptions" onClick="fillOptions"
runat="server" />
Normally I'd do
"((DropDownList)e.Item.FindControl("CatalogFamilyID")).Items.Add(new
ListItem ("Test"));" but that only works in a handler that has e as the
DataListItemEventArgs.
When creating the code to handle fillOptions I have only EventArgs to work
with, so I see no real way of editing controls in the datalist control.
Any tips? Thanks!
Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com