MVC5 Classic
Step 1 of 5: Create an MVC Classic Web Application

Begin by creating a new C1 ASP.NET MVC 5 Web Application. It will be automatically styled with built-in views and is based on the default project template that Microsoft ships. Complete the following steps:

  1. In Visual Studio, select File | New | Project.
  2. Under Installed Templates,  select Visual C#:Web. The .NET Framework 4 or above should be selected in order to create an MVC 5 application.
  3. Select C1 ASP.NET MVC 5 Web Application (if you haven’t installed this, see Installing the MVC Classic Template), enter a name for the application, and click OK.
  4. Your Wijmo project is created. You'll notice it contains the Models, Views, and Controllers folders. With MVC scaffolding, a CodeTemplates folder is also created.
  5. In the Solution Explorer, expand the Views | Shared node and open the _Layout.cshtml. Notice that some javascript has already been added to the page to turn any menus, buttons, checkboxes, radio buttons,  and simple input boxes into Wijmo widgets:
    
    <script type="text/javascript">
    
      $(document).ready(function () {
      $("#menu").wijmenu();
      $(".button").button();
      $(":input[type='submit']").button();
      $(":input[type='checkbox']").wijcheckbox();
      $(":input[type='radio']").wijradio();
      $(":input[type='text'],:input[type='password'],textarea").not(":wijmo-wijinputnumber").not(":wijmo-wijinputmask").not(":wijmo-wijinputdate").wijtextbox();
      $("select").not(":wijmo-wijcombobox").wijdropdown();
      });
      </script>
    
    

    Find the <ul id="menu"> element and replace the existing list items <li> in the markup to set up the page:

    <li>@Html.ActionLink("Home", "Index", "Home")</li>
    <li>@Html.ActionLink("Lists", "Index", "TahDoList")
     <ul>
      <li>@Html.ActionLink("Add List", "Create", "TahDoList")</li>
     </ul>
    </li>
    <li>@Html.ActionLink("Items", "Index", "TahDoItem")
     <ul>
      <li>@Html.ActionLink("Add Item", "Create", "TahDoItem")</li>
     </ul>
     </li>
    <li>@Html.ActionLink("About", "About", "Home")</li>
    
    

    This markup will add Lists and Items menu items that will link to the controllers you will add later. Now add a model for the project.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback