Nu har vi lagt till ett web-projekt ASP MVC
This commit is contained in:
30
MVCUI/App_Start/BundleConfig.cs
Normal file
30
MVCUI/App_Start/BundleConfig.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System.Web;
|
||||
using System.Web.Optimization;
|
||||
|
||||
namespace MVCUI
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||
"~/Scripts/jquery.validate*"));
|
||||
|
||||
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
||||
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
|
||||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
||||
"~/Scripts/modernizr-*"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
|
||||
"~/Scripts/bootstrap.js"));
|
||||
|
||||
bundles.Add(new StyleBundle("~/Content/css").Include(
|
||||
"~/Content/bootstrap.css",
|
||||
"~/Content/site.css"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
Imports System.Web.Optimization
|
||||
|
||||
Public Module BundleConfig
|
||||
' For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
|
||||
Public Sub RegisterBundles(ByVal bundles As BundleCollection)
|
||||
|
||||
bundles.Add(New ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js"))
|
||||
|
||||
bundles.Add(New ScriptBundle("~/bundles/jqueryval").Include(
|
||||
"~/Scripts/jquery.validate*"))
|
||||
|
||||
' Use the development version of Modernizr to develop with and learn from. Then, when you're
|
||||
' ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
|
||||
bundles.Add(New ScriptBundle("~/bundles/modernizr").Include(
|
||||
"~/Scripts/modernizr-*"))
|
||||
|
||||
bundles.Add(New ScriptBundle("~/bundles/bootstrap").Include(
|
||||
"~/Scripts/bootstrap.js"))
|
||||
|
||||
bundles.Add(New StyleBundle("~/Content/css").Include(
|
||||
"~/Content/bootstrap.css",
|
||||
"~/Content/site.css"))
|
||||
End Sub
|
||||
End Module
|
||||
|
||||
13
MVCUI/App_Start/FilterConfig.cs
Normal file
13
MVCUI/App_Start/FilterConfig.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace MVCUI
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
Imports System.Web
|
||||
Imports System.Web.Mvc
|
||||
|
||||
Public Module FilterConfig
|
||||
Public Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection)
|
||||
filters.Add(New HandleErrorAttribute())
|
||||
End Sub
|
||||
End Module
|
||||
23
MVCUI/App_Start/RouteConfig.cs
Normal file
23
MVCUI/App_Start/RouteConfig.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace MVCUI
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{controller}/{action}/{id}",
|
||||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
Imports System
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Linq
|
||||
Imports System.Web
|
||||
Imports System.Web.Mvc
|
||||
Imports System.Web.Routing
|
||||
|
||||
Public Module RouteConfig
|
||||
Public Sub RegisterRoutes(ByVal routes As RouteCollection)
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
|
||||
|
||||
routes.MapRoute(
|
||||
name:="Default",
|
||||
url:="{controller}/{action}/{id}",
|
||||
defaults:=New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional}
|
||||
)
|
||||
End Sub
|
||||
End Module
|
||||
Reference in New Issue
Block a user