I making a MVC2 project
View:
<%= Html.DropDownListFor ( m => m.CategoryId, Model.CategoryList )%>
<%= Html.ValidationMessageFor ( m => m.CategoryId )%>
<br />
<%if ((Html.TextBoxFor(m => m.NewCategory)).Equals("")) %>
<%{ show error msg near the textbox "* field is required"}%>
<% else %>
<%= Html.TextBoxFor(m => m.NewCategory)%>
If textbox is empty then show error msg and let the user to input again, how to do this?? :S