Hi,
I have a requiredfiledvalidator which validates the value of a dropdown list. The dropdown list gets populated from a database, so I don't know in advance what the values are. What should I do to set an initial value in the
<asp:RequiredFieldValidator runat="server" ID="validateDocumentType" ErrorMessage="You must select a document type."
Display="None" ControlToValidate="documentTypeDropDown" InitialValue="?????"/>
I tried to use
HtmlControl docDropDown = (HtmlControl)documentsForm.FindControl("docDropDown"); in my behind code,
but this dose not give me access to the value field of a listitem.
Thank you for your help.
...
Go to the complete details ...