Use this area to provide additional information.
9 |
--------------------------------------------------------------------------------
/samples/ExampleFullWebApplication/Views/Home/Contact.vbhtml:
--------------------------------------------------------------------------------
1 | @Code
2 | ViewData("Title") = "Contact"
3 | End Code
4 |
5 |
12 |
13 |
Getting started
14 |
15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
16 | enables a clean separation of concerns and gives you full control over markup
17 | for enjoyable, agile development.
18 |
19 |
Learn more »
20 |
21 |
22 |
Get more libraries
23 |
NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.
24 |
Learn more »
25 |
26 |
27 |
Web Hosting
28 |
You can easily find a web hosting company that offers the right mix of features and price for your applications.
29 |
Learn more »
30 |
31 |
32 |
--------------------------------------------------------------------------------
/samples/ExampleFullWebApplication/Views/Shared/Error.vbhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
31 | @RenderBody()
32 |
33 |
36 |
37 |
38 | @Scripts.Render("~/bundles/jquery")
39 | @Scripts.Render("~/bundles/bootstrap")
40 | @RenderSection("scripts", required:=False)
41 |
42 |
43 |
--------------------------------------------------------------------------------
/samples/ExampleFullWebApplication/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 | Use this area to provide additional information.
8 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibrary/Views/Home/Contact.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Contact";
3 | }
4 |
12 |
13 |
Getting started
14 |
15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
16 | enables a clean separation of concerns and gives you full control over markup
17 | for enjoyable, agile development.
18 |
19 |
Learn more »
20 |
21 |
22 |
Get more libraries
23 |
NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.
24 |
Learn more »
25 |
26 |
27 |
Web Hosting
28 |
You can easily find a web hosting company that offers the right mix of features and price for your applications.
29 |
Learn more »
30 |
31 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibrary/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
31 | @RenderBody()
32 |
33 |
36 |
37 |
38 | @Scripts.Render("~/bundles/jquery")
39 | @Scripts.Render("~/bundles/bootstrap")
40 | @RenderSection("scripts", required: false)
41 |
42 |
43 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibrary/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibrary/razorgenerator.directives:
--------------------------------------------------------------------------------
1 | RazorVersion: 3
2 | Generator: MvcView
3 | GeneratePrettyNames : true
4 | GenerateAbsolutePathLinePragmas : true
5 | ExcludeForCodeCoverage : true
6 | Namespace : ASP
7 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/BundleConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Optimization;
3 |
4 | namespace ExampleRazorLibraryApplication
5 | {
6 | public class BundleConfig
7 | {
8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
9 | public static void RegisterBundles(BundleCollection bundles)
10 | {
11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12 | "~/lib/jquery/jquery-{version}.js"));
13 |
14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
15 | "~/lib/jquery-validate/jquery.validate.js*").Include(
16 | "~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"));
17 |
18 | // Use the development version of Modernizr to develop with and learn from. Then, when you're
19 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
20 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
21 | "~/lib/modernizr/modernizr.js"));
22 |
23 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
24 | "~/lib/bootstrap/dist/js/bootstrap.js"));
25 |
26 | bundles.Add(new StyleBundle("~/Content/css").Include(
27 | "~/lib/bootstrap/dist/css/bootstrap.css",
28 | "~/Content/site.css"));
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/FilterConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Mvc;
3 |
4 | namespace ExampleRazorLibraryApplication
5 | {
6 | public class FilterConfig
7 | {
8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9 | {
10 | filters.Add(new HandleErrorAttribute());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/RouteConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Web.Routing;
7 |
8 | namespace ExampleRazorLibraryApplication
9 | {
10 | public class RouteConfig
11 | {
12 | public static void RegisterRoutes(RouteCollection routes)
13 | {
14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15 |
16 | routes.MapRoute(
17 | name: "Default",
18 | url: "{controller}/{action}/{id}",
19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20 | );
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/WebApiConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web.Http;
5 |
6 | namespace ExampleRazorLibraryApplication
7 | {
8 | public static class WebApiConfig
9 | {
10 | public static void Register(HttpConfiguration config)
11 | {
12 | // Web API configuration and services
13 |
14 | // Web API routes
15 | config.MapHttpAttributeRoutes();
16 |
17 | config.Routes.MapHttpRoute(
18 | name: "DefaultApi",
19 | routeTemplate: "api/{controller}/{id}",
20 | defaults: new { id = RouteParameter.Optional }
21 | );
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/Content/Site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Set padding to keep content from hitting the edges */
7 | .body-content {
8 | padding-left: 15px;
9 | padding-right: 15px;
10 | }
11 |
12 | /* Override the default bootstrap behavior where horizontal description lists
13 | will truncate terms that are too long to fit in the left column
14 | */
15 | .dl-horizontal dt {
16 | white-space: normal;
17 | }
18 |
19 | /* Set width on the form input elements since they're 100% wide by default */
20 | input,
21 | select,
22 | textarea {
23 | max-width: 280px;
24 | }
25 |
--------------------------------------------------------------------------------
/samples/RazorLibrary/ExampleRazorLibraryApplication/ExampleRazorLibraryApplication.csproj:
--------------------------------------------------------------------------------
1 |