Back to Devexpress

Integration into an Existing Project Using Wizards

aspnetmvc-8162-getting-started-integration-into-aspnet-mvc-project-integration-into-an-existing-project-using-wizards.md

latest5.2 KB
Original Source

Integration into an Existing Project Using Wizards

  • Jul 20, 2024
  • 16 minutes to read

This topic explains how to incorporate DevExpress Extensions for ASP.NET MVC into an existing ASP.NET MVC application using wizards. If you wish to create a new ASP.NET MVC application and use a DevExpress ASP.NET MVC extension within it, create a new application using specially designed DevExpress project templates.

You can use the DevExpress Project Wizard or the Insert Extension Wizard to simplify the integration of DevExpress ASP.NET MVC extensions into your project.

This document consists of two step-by-step tutorials.

Integrating DevExpress ASP.NET MVC Extensions into an Existing Project using the Project Wizard

To integrate DevExpress ASP.NET MVC extensions into an existing project using the Project Wizard , perform the following steps.

  1. Open your ASP.NET MVC project. In the main menu of Visual Studio, click the DEVEXPRESS submenu and select ASP.NET Controls v25.2 | Run Wizard to Update Project….

  2. This invokes the DevExpress ASP.NET MVC Project Wizard. This wizard allows you to customize the settings specific to DevExpress ASP.NET MVC Extensions (e.g., you can select the required theme or select the localization). After the required settings have been specified, click Update Project.

  3. Attach the required JavaScript files.

  4. Attach the required style sheets.

  5. You should include the ignore route statements with the following patterns to prevent requests from being passed to a controller:

  6. Override the Default Model Binder.

  7. If you create an ASP.NET MVC project using the standard ASP.NET MVC Web Application template provided by Visual Studio, the project’s Content folder contains the automatically generated Site.css file. Specific type selectors that are defined in this file and relate directly to HTML element types (such as links, input elements, tables and table cells) may adversely affect the appearance of DevExpress MVC extensions. To fix this problem, you are required to clear the style settings defined in the element type selectors. This requirement also applies to your custom CSS files and rules, if any.

  8. It is recommended that you use the following document type for Views, to ensure that DevExpress ASP.NET MVC extensions work properly.

You can now use DevExpress extensions within your ASP.NET MVC application.

Integrating DevExpress ASP.NET MVC Extensions into an Existing Project using the Insert Extension Wizard

To integrate DevExpress ASP.NET MVC extensions into an existing project using the Insert Extension Wizard , perform the following steps.

  1. Open your ASP.NET MVC project. Go to the View in which you wish to insert an extension. Focus the line of code where you will insert the extension. Right-click and select the Insert DevExpress MVC Extension v25.2… item in the context menu.

  2. This invokes the Insert Extension Wizard. This wizard allows you to select the required extension, define its settings and add the extension to the View. After specifying the required extension settings, click Insert.

  3. Attach the required JavaScript files.

  4. Attach the required style sheets.

  5. You should include the ignore route statements with the following patterns to prevent requests from being passed to a controller:

  6. Override the Default Model Binder.

  7. If you create an ASP.NET MVC project using the standard ASP.NET MVC Web Application template provided by Visual Studio, the project’s Content folder contains the automatically generated Site.css file. Specific type selectors that are defined in this file and relate directly to HTML element types (such as links, input elements, tables and table cells) may adversely affect the appearance of DevExpress MVC extensions. To fix this problem, you are required to clear the style settings defined in the element type selectors. This requirement also applies to your custom CSS files and rules, if any.

  8. It is recommended that you use the following document type for Views to ensure that DevExpress ASP.NET MVC extensions will work properly.

The required extension has now been inserted into the View, and you can use all other DevExpress extensions within your ASP.NET MVC application.

Refer to the Get Started topic to learn about the fundamentals of DevExpress ASP.NET MVC extensions.

See Also

Manual Integration into an Existing Project

Get Started