The problem is that your ModelState is re-filled with the posted values.
What you can do is clear it on the Action that has the Post attribute :
ModelState.Clear();
More Related Contents:
- POST a form array without successful
- ASP.NET MVC Conditional validation
- asp.net MVC 4 multiple post via different forms
- mvc Html.BeginForm different URL schema
- MVC Form Validation on Multiple Fields
- issue with form C# asp.net mvc
- Post an HTML Table to ADO.NET DataTable
- Convert Json String to C# Object List
- How do I export to Excel?
- How do I detect keyPress while not focused?
- Getting full URL of action in ASP.NET MVC [duplicate]
- How to RedirectToAction in ASP.NET MVC without losing request data
- How to submit http form using C#
- Get error message if ModelState.IsValid fails?
- CustomAttribute reflects html attribute MVC5
- Child actions are not allowed to perform redirect actions, after setting the site on HTTPS [duplicate]
- Ignoring a field during .NET JSON serialization; similar to [XmlIgnore]?
- How to declare a local variable in Razor?
- Storing more information using FormsAuthentication.SetAuthCookie
- Pulling a View from a database rather than a file
- Conditional html attribute with Html Helper
- How to add and get Header values in WebApi
- Web API in MVC solution in separate project
- Html.ActionLink cannot be dynamically dispatched
- Exception is: InvalidOperationException – The current type, is an interface and cannot be constructed. Are you missing a type mapping?
- MVC4 – Bundling does not work when optimizations are set to true
- Dealing with large file uploads on ASP.NET Core 1.0
- ASP.NEt MVC using Web API to return a Razor view
- Using a wwwroot folder (ASP.NET Core style) in ASP.NET 4.5 project
- The parameters dictionary contains a null entry for parameter ‘id’ of non-nullable type ‘System.Int32’