Hello, I have a datalist on a web form and I am trying to reference the listbox within the datalist. I am pretty sure I want to use FindControl, but I keep coming up with Nothing being returned from:
Thanks in advance!
Code:
Private Sub DataList1_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.EditCommand
DataList1.EditItemIndex = e.Item.ItemIndex
DataList1.ShowFooter = False
lstDetectionFactor = CType(e.Item.FindControl("lstEditDetectionFactor"), DropDownList)
End Sub
Thanks in advance!