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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -