I have a form with multiple search filters. Let's say Order Id, PO Num, Store Code, Status, etc. I would like to make Store Code required while user searches using PO Num. Is it possible using Data Annotation in asp.net mvc 3?
相关问题
- Entity Framework throws exception - Network Relate
- Slow loading first page - ASP.NET MVC
- How to do an inline style with asp.net mvc 3 razor
- How to access the System.ComponentModel.DataAnnota
- Validation Attribute get triggered two times
相关文章
- “Dynamic operations can only be performed in homog
- Change color of bars depending on value in Highcha
- How to get server path of physical path ?
- How to find the exceptions / errors when TryUpdate
- ASP.Net MVC 3: optgroup support in Html.DropDownLi
- A circular reference was detected while serializin
- AccessViolationException was unhandled
- How to hide miniprofiler?
One option is you have your own custom validation and implement IValidatableObject See: ASP.NET MVC Conditional validation
Note though this is only on the server side. There will be no client side validation here. If you want client side validation as well on this conditional validation check out:
http://blogs.msdn.com/b/simonince/archive/2011/02/04/conditional-validation-in-asp-net-mvc-3.aspx