tag:blogger.com,1999:blog-8980734269859237005.post8896733804704505513..comments2024-01-30T01:03:21.768-08:00Comments on DevCurry: Using the jQuery Validation Plugin to Validate a DropDownListSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8980734269859237005.post-66186858060099711052011-06-15T09:07:13.999-07:002011-06-15T09:07:13.999-07:00Thank you for posting, both solutions work.
I had...Thank you for posting, both solutions work.<br /><br />I had a slightly different scenario where the DropDownList default selected item was a prompt with "-1" value:<br /><br /><br /><br />This was generated in a server control so I couldn't change the initial value to null.<br /><br />As it turns out, jQuery will pass the value, not the text into the selectNone validation method, Monte Kearleyhttps://www.blogger.com/profile/01811566691236565219noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-52698304675032270052010-05-26T07:38:50.545-07:002010-05-26T07:38:50.545-07:00Elijah: Thanks for the tip.
Btw, the || does not...Elijah: Thanks for the tip. <br /><br />Btw, the || does not get printed in blogger. I had to edit the HTML and escape the characters for it to show up!Suprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-8980734269859237005.post-91487775066336976042010-05-26T05:30:26.946-07:002010-05-26T05:30:26.946-07:00You could also use the required validator if you s...You could also use the required validator if you set the "Value" attribute of your "Select an option" listitem to empty string <br /><br /><asp:ListItem Text="Select an option" Value=""></asp:ListItem></code><br /><br />Then you can use the default required validator...<br /><br /> $(function () {<br /> $("#form1Anonymoushttps://www.blogger.com/profile/14667340517136058696noreply@blogger.com