Aspx MVC Framework learning Note 1

Source: Internet
Author: User
Tags dot net dot net framework
After experiencing the webform framework, aspx introduced the MVC framework. I think the main purpose is to develop the framework and make it easy to test.
Some tutorials on installing the Internet have been written CodeTo record the problems encountered in the code.

First install the software environment you need
1. Visual Studio 2008
2. Dot NET Framework 3.5 extension (

The steps are as follows:
1. Create a project in vs2008, select the ASP. net mvc web application and test template, and enter the project file name productmvc
2. After the new project is created, the automatically generated file directory structure mainly includes models, views, and controllers.
There are home and share folders under views. Home has view files of corresponding actions, and share is a template file of Aspx.
3. Add the model file. Under the models folder, select Add-> data-> LINQ to data class.
Select the required database file and drag and drop the datatable of the database to the dbml design interface. Save the file and complete the definition of the LINQ data context.
4. Add-> MVC controller class under the controllers folder
5. Create a folder product under the views folder and add a new MVC View content page.
6. after completing the preceding steps, you can use http: // localhost/product/to access the index view of the product, but there is no required link on the site navigation, modify views-> share-> site. master File, add the product link to the template file to add a new controller to the navigation.

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: 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.