1

I have an HTML form with two dropdown lists that represent a credit card expiry month and year. In my controller, I am checking to see if the month/year selected is in the future. If not, I add an error to the ModelState to be returned to the user.

The only thing I haven't figured out is how to get the dropdown lists to highlight in red like a textbox does when it doesn't meet the required field requirements, or other checks implemented using DataAnnotations.

Any hints? Using C# and .NET 4.5.

2
  • Does the answer to this question help? stackoverflow.com/questions/4729440/… Commented Feb 3, 2013 at 19:42
  • shawn, please share your View so we can see your way of forming your dropdownlist Commented Feb 3, 2013 at 20:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.