asp.net mvc - unable to display the validation messages from @Html.ValidationSummary() in MVC view -


i have simple form created in partial view , loading form on jquery dialog. view tightly bound model. when user clicks on submit button out entering inputs, need show validation messages.

<div>     <form method="post" enctype="multipart/form-data" id="ssimform" action="home/processuploadedfile"     onsubmit="return false;">     <div>         <h3>             select file uploaded :</h3>         <span>             <input type="file" name="uploadfilename" id="uploadfilename" /></span>     </div>     <div>         <h3>             select date range :</h3>         <span class="uslabel">from date(mm/dd/yyyy): </span>         <input class="usdate" id="usfromdate" name="startdate" type="date" />         <span class="uslabel">to date(mm/dd/yyyy): </span>         <input class="usdate" id="ustodate" name="enddate" type="date" />     </div>         <div>         <br />                 <input type="submit" id="submitbutton" name="submitbutton" value="process file" />     </div>     @html.validationsummary()     <div class="message-success">         <span>@viewbag.confirmation</span>     </div>     <div class="message-error">         <span>@viewbag.error</span>     </div>     </form>   </div> 

now comes actual problem. when submit form able see validationsummary object populated messages, not getting rendered on screen.

i able see messages if replace content of dialog response jquery ajax call, fetches entire view server side. not want take approach beleive not correct way return validation summary in mvc.

am missing something? appreciated.

i don't know why don't have @using (html.beginform()) { } block.

here blog post quick , easy way set validation summary + unobtrusive validation mvc3+.
http://geekswithblogs.net/stun/archive/2011/01/28/aspnet-mvc-3-client-side-validation-summary-with-jquery-validation-unobtrusive-javascript.aspx


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -