this is my Form:
<% using (Html.BeginForm("RepR", "Agence", FormMethod.Post, new { @class = "search_form" })) { %>
<%: Html.ValidationSummary(true) %>
<%: Html.Hidden("to", Model.mailc) %>
<p>
Sujet : <br />
<%: Html.TextBox("sub")%>
<br />
Message : <br />
<%: Html.TextArea("msg")%>
</p>
<input type="submit" value="Envoyer" class="button"/>
<% } %>
It works so fine, but I want to add some validation message (I can't use Model because this form is on page where I use an another model). I already tried with this ways but dosn't works
<%: Html.ValidationMessage("sub","Requiered field") %>
any idea here on what i should use?