How to suppress initial validation error in ASP.NET MVC3 -


asp.net mvc3 view displays validation error if request invoked. how show validation error if post request used in mvc2 ?

view:

<%= html.validationsummary(false, "error") %>

controller:

namespace store.controllers {     public class checkoutcontroller : myapp.controllers.controllerbase     {         [httpget]         public actionresult address()         {             return view(new addressviewmodel());         }           [httppost, validateantiforgerytoken]         public actionresult address(addressviewmodel model, string name) {           if (!modelstate.isvalid)             return view(model);           return redirecttoaction("payment");          }        }        } 


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -