asp.net MVC Framework (part Fourth) Handles form editing and submission scenarios

Source: Internet
Author: User

The first of this series builds a simple list of E-commerce products/browsing sites. It discusses the high-level concepts behind MVC, demonstrating how to create a new ASP.net MVC project from scratch, and implement and test this E-commerce product List feature. The second chapter of the series explores the URL path selection (routing) architecture of the ASP.net MVC framework, discusses how it works, and how you can use it to handle more advanced URL path selection scenarios. The third chapter discusses how the controller interacts with the view, especially the way you can pass the view data from the controller to the view to show the replies returned to the client.

In today's post, I'll discuss various ways you can use the MVC framework to work with form input and submit scenarios, and discuss some HTML-assisted methods that you can use to simplify data-editing scenarios. Here we download the source code for the complete application that we will build to explain these concepts below.

Form input and submit scenes

To demonstrate some basic principles for handling form input and submission scenarios in the ASP.net MVC framework, we will build a simple product list, product generation, and product editing scenarios. It will have three core user experiences:

List of products by class

By navigating to a URL such as/products/category/[categoryid], users will be able to see a list of all products in a particular product Category:

Add New Product

Users will be able to add a new product to the store by clicking on the "Add new Product" link above. Once clicked, it will go to the/products/new URL, where the user will be prompted to enter the details of the new product to be added:

After you click Save, the product is added to the database and then turned back to the Product List page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.