With MVC, I hear that it's good practice to get back to a 'GET' action by using RedirectToAction after processing the Http postback. I understand this is so the postback is not repeated should the user refresh the page or bookmark and revisit it. I think that is sensible but after the redirect the model errors are lost so I can't display them using Html.ValidationSummary. What is the recommended practice in this scenario? Many thanks
Related Questions in ASP.NET-MVC
- I have a problem outputing the roles on the page ListRoles.cshtml
- Dropdown list showing SQLServer2005SQLBrowserUser$DONSERVER instead of Active Directory group name in ASP.NET MVC C#
- Hosting ASP.NET MVC application on IIS web server using Windows 2019 server
- How to display only department fields associated with a selected department in student automation system?
- How to send select input data for form submission?
- Multi level project reference using dll
- How to upload file to Onedrive using ASP.NET MVC?
- ASP.NET MVC web app looping between fields only on some devices
- Is there any automatic job to load AD-groups?
- How to restrict admin js files to download
- Download PDF in ASP.NET MVC application
- How to add bootstrap theme/example into ASP.NET MVC 5?
- Web API works with Windows authentication enabled when consumed via Swagger but throws an unauthorized issue when accessed through web app
- ASP.Net Core 7.0 Web App (Model-View-Controller) ErrorViewModel OnGet OnPost do not get called or executed
- OAuth 2.0 keep getting Authorization has been denied for this request
Related Questions in ASP.NET-MVC-3
- Insert new user AspNetUser from another controller in .NET 7
- Error HRESULT E_FAIL has been returned from a call to a COM component in Asp.net MVC
- ASP.NET MVC 3/4 Razor - public action method not found - how to debug
- get data by linq but have Error when doit this
- ASP.NET issue facing exception issue
- How to Implement a View Count Feature for a Blog Website in Asp.net MVC Using a Database?
- Unable to install ASP.NET MVC 3 using chocolatey
- Display data from DB to ajaxToolkit LINE CHART (Ajax control Toolkit v20.1) Using ASP.NET Webform C# (Dissertation Question)
- Why ModelState Isvalid false when working on images
- How to create an ASP.NET MVC 3.2.7 page with 3 view models
- How to make correct test project
- MVC Increase max number of concurrent simultaneous request per user
- Error Number:2705,State:4,Class:16 Code first approach
- Integrating the SSO for MVC3 application with AzureADB2C account
- How to integrate Asp.Net MVC existing application to MAUI Framework
Related Questions in REDIRECTTOACTION
- How do I redirect to a action outside of the function running the code
- Redirect from controller to another controller
- Redirect To Another Post Method on failure of one in asp.net
- ASP.NET Core MVC model binding does not work with TempData
- Is there a way to change or specifically mention protocol on RedirectToAction from http to https
- RedirectToAction doesn't redirect and instead returns call to View page
- How to invoke method of a controller from another one?
- Redirect to an action method of type HttpPost in ASP.NET Core 5 MVC
- RedirectToAction TempData is NULL
- How to properly use RedirectToAction()
- RedirectToAction not redirecting to Get Action of another controller
- How to call RedirectToAction in asynchronous Task methods?
- ASP.NET RedirectToAction change DateTime format in request
- Redirect To Action with ID Parameter - .NetCore Web App MVC
- The view content doesn't refresh when using RedirectToAction method
Related Questions in ADDMODELERROR
- Unity Game crash
- Validation errors showing before filling the model ASP.NET Core
- ModelState.AddModelError dosn`t show my error message
- Mvc Model Validation Errors Not Showing when partial view Inside The another view
- How to display Exception (type) pass into AddModelError?
- MVC Partial View ModelState Error
- Change Encoding in ModelState.ModelError
- Model Error Not Showing after Http Post MVC 4
- How to make error message disappear when Checkbox is Checked
- How to get ModelState Errors at runtime using Key added by ModeState.AddModelError( key,value)
- Add model state error and validate after redirect to action
- MVC3 RedirectToAction after postback
- What determines the key in the ModelStateDictionary for Items of Collection Properties
- View the Validation summery in the required place
- ModelState.AddModelError on form level with ASP.NET MVC 2 RC
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You shouldn't allow to redirect before errors are displayed. In fact, all logic happens before redirect - insert new data, check data, display errors, correct data, save data, redirect, insert new data.