ASP. NET mvc4 Getting Started Guide (10): third-party control studio for ASP. NET wijmo mvc4 tool Application

Source: Internet
Author: User

The latest version of componentone studio for ASP. NET wijmo 2013v1 supports mvc4, including:

    • NewMVC 4 Engineering Template (C # & VB)The out-of-the-box MVC 4 Engineering Template is created based on the Microsoft built-in template. We only optimized the tag and CSS styles into the wijmo style, and we are familiar with the template layout and interface style, it will undoubtedly shorten your learning process, save development time, and improve development efficiency.
    • New international theme (METRO)
      • Mvc4 template auto-enhancement wijmoThe MVC scaffolding template will be applied for youProgramIn the add, delete, modify, query (crud) operation to generate the default template files, these generated files build the initial project file directory structure for your project, of course you can also modify it, the beauty of the scaffolding template is that after the template is generated, you can expand it as you wish.
      • Wijmo-enhanced editor TemplateThis template allows you to quickly customize applications using the date selector, value input box, and slide bar. You can even add other custom templates.

 

Start to use

To use componentone studio for ASP. NET wijmo to create an mvc4 application, you must first install studio for ASP. NET wijmo.

Test Environment vs2012, mvc4, framework4.5, ie10, studio for ASP. NET wijmo2013v1

File-create a project

After studio for ASP. NET wijmo2013v1 is installed, select Create Project in vs2012. On the Web tab, you can find studio for ASP. NET wijmo2013v1.

Now let's run the program to see the initial effect. You may be familiar with this interface. Because the wijmo MVC 4 Project template is created based on the Microsoft built-in template. We only optimized the tag and CSS style to the wijmo style.

Add Model

Next, let's use the wijmo MVC scaffolding template to create a simple "todolist ". First, add the model. Add the followingCode:

Namespace mvc4wijmo. models {public class todolist {[editable (false)] public int ID {Get; set;} [required] Public String title {Get; set ;} [display (name = "date created")] public datetime? Createdat {Get; set;} [range (0, 5), uihint ("intslider")] public int priority {Get; set;} [range (0, 1000000)] public decimal cost {Get; set;} [datatype (datatype. multilinetext)] Public String summary {Get; set;} public bool done {Get; set;} [display (name = "date completed")] public datetime? Doneat {Get; set;} public icollection <tahdoitem> tahdoitems {Get; Set ;}} public class tahdoitem {[editable (false)] public int ID {Get; set ;} [required] Public String title {Get; set;} [display (name = "date created")] public datetime? Createdat {Get; set;} [range (0, 5), uihint ("intslider")] public int priority {Get; set;} [datatype (datatype. multilinetext)] Public String note {Get; set;} public int todolistid {Get; set;} public todolist {Get; set;} public bool done {Get; set ;} [display (name = "date completed")] public datetime? Doneat {Get; Set ;}}}
Create controllers and views

Compile the project before adding controllers and views. This will enable the scaffolding template to identify the new model. Now, in the email, click the controllers folder, select "add controller", and click "add" in the options ".

Scaffolding will automatically generate a controller and add, delete, and modify all views required by the application. The biggest highlight is that these generated files have built the initial project file directory structure for your project, and you can also modify it, the beauty of the scaffolding template is that after the template is generated, you can expand it as you wish.

Run

Through the above steps, we have implemented a simple todolist. Switch to the todolist page. The application will create a data source for the model. First, an empty table is displayed. You can click "create new plan" to add a plan.

When creating a view, you will find that the standard editorfor helpers is displayed. However, we have added a custom editing template to the project. Therefore, if the date or numeric type is used, the scaffolding template automatically generates an editor. The following custom editor View:

Now we have completed the addition, deletion, modification, and query functions.Mvc4Application.These generated files build the directory structure of the initial project file for your project. Of course, you can also modify it, the beauty of the scaffolding template is that after the template is generated, you can expand it as you wish.

 

Download demo source code:Tahdomvc4.zip

Tool download link:Studio for ASP. NET wijmo

 Download the complete document:ASP. NET mvc41_1_timeout

Certificate -----------------------------------------------------------------------------------------------------------------------------------------------

Note:

9 articles in this seriesArticle, Translated from ASP. net mvc4 official tutorial, due to the concise description of this series of articles, the length is moderate, from an example to explain, the full text finally completed a small system for managing movies, very suitable for beginners ASP.. Net mvc4. Nine articles:

1. Introduction to ASP. NET mvc4

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/intro-to-aspnet-mvc-4

· Address: http://www.cnblogs.com/powertoolsteam/archive/2012/11/01/2749906.html

2. Add a controller

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-controller

· Address: http://www.cnblogs.com/powertoolsteam/archive/2012/11/02/2751015.html

3. Add a view

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-view

· Address: http://www.cnblogs.com/powertoolsteam/archive/2012/11/06/2756711.html

4. Add a model

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-model

· Address: http://www.cnblogs.com/powertoolsteam/archive/2012/12/17/2821495.html

5. Access the data model from the Controller

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/accessing-your-models-data-from-a-controller

· Address: http://www.cnblogs.com/powertoolsteam/archive/2013/01/11/2855935.html

6. Verify the editing method and view

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/examining-the-edit-methods-and-edit-view

· Address: http://www.cnblogs.com/powertoolsteam/archive/2013/01/24/2874622.html

7. Add new fields to the movie table and Model

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-new-field-to-the-movie-model-and-table

· Address: http://www.cnblogs.com/powertoolsteam/archive/2013/02/26/2933105.html

8. Add a validator to the Data Model

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-validation-to-the-model

· Address: http://www.cnblogs.com/powertoolsteam/archive/2013/03/05/2944030.html

9. query details and delete records

· Original address: http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/examining-the-details-and-delete-methods

· Address: http://www.cnblogs.com/powertoolsteam/archive/2013/03/07/2948000.html

10. Third-party control studio for ASP. NET wijmo mvc4 tool Application

Address: http://www.cnblogs.com/powertoolsteam/archive/2013/05/09/3068699.html

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.