Field Validation

  • Thread starter Thread starter msnews
  • Start date Start date
M

msnews

Hi All,

I have a state dropdown box. The first item in it is "Select One" and after
that the state names are there.
The default is "Select One" item.
Is it possible to validate the dropdown box (the validation should exclude
the first item).

Thanks in advance.
 
Hi All,

I have a state dropdown box. The first item in it is "Select One" and
after that the state names are there.
The default is "Select One" item.
Is it possible to validate the dropdown box (the validation should
exclude the first item).


Yes. Assign a required field validator to the drop down box.

Set the value of the first item to "".

So when you're adding the first item, go:

MyDropDown.items.add(New ListItem("Select One", ""))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top