我有以下观点,当用户尝试提交选择了大于5的项目时,我需要显示一条错误消息。我可以在控制器端执行此操作,但我可以在视图中使用jquery来执行此操作吗?我认为jquery会更容易更快。 @using (Html.BeginForm()) <h1>Manage Testimonials</h1>
<p><b>Please select up to 5 testimonials you want to include for your sales flyers. A maximum of only 5 te