Chapter 12. Editing data

It matters not what someone is born, but what they grow to be.

— J. K. Rowling

At its core, editing data from within an ASP.NET MVC application is easy. All you do is create an HTML form and post data from there to some HTTP endpoints. To be even more precise, it all boils down to arranging a POST (or even a GET) HTTP call to pass all necessary data. To place an HTTP call, you can use jQuery or plain Ajax facilities, but using an HTML form is still the most widely used approach.

In this chapter, I’ll review a few common practices for posting data to a web server and for dealing with the system’s feedback, whether that feedback is a plain confirmation or a list of errors.

A common form for the login page

In any realistic ...

Get Modern Web Development: Understanding domains, technologies, and user experience now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.