Accessing a Custom Control in EditItemTemplate Datalist
Posted on 2004-09-16
I have a custom control in the EditItemTemplate of a Datalist.
The custom control is called mspwc:DatePicker, which is a datepicker with a DHTML calendar.
The control works fine in the EditItemTemplate, but the problem I have is accessing the value of the control to save it to a database.
I normally use this statement to recover EditItemTemplate values;
Dim strMemberName As String = CType(e.Item.FindControl("ddlMemberName"), DropDownList).SelectedItem.Value
When I try to replace DropDownList with the DatePicker it is not recognized.
Any suggestions on how I can recover the datepicker values, or suggestions on how I can do something similar?