From 4cd3bdc303d961207f061279826022709eed8138 Mon Sep 17 00:00:00 2001 From: Alex Friedman Date: Wed, 26 Dec 2012 17:32:09 -0500 Subject: [PATCH] Added options for external JS file, and omit script tag --- NGon.SampleApplication/Global.asax.cs | 13 +++- .../Views/Shared/_Layout.cshtml | 4 +- NGon.SampleApplication/Views/Web.config | 2 +- NGon.Tests/NGonTests.cs | 32 +++++++++ NGon/HtmlHelperExtensions.cs | 67 +++++++++++++++++-- 5 files changed, 109 insertions(+), 9 deletions(-) diff --git a/NGon.SampleApplication/Global.asax.cs b/NGon.SampleApplication/Global.asax.cs index e396b60..2084c0b 100644 --- a/NGon.SampleApplication/Global.asax.cs +++ b/NGon.SampleApplication/Global.asax.cs @@ -1,11 +1,15 @@ -using System.Web.Mvc; +using System.Web.DynamicData; +using System.Web.Mvc; using System.Web.Routing; +using System.Web.SessionState; namespace NGon.SampleApplication { // Note: For instructions on enabling IIS6 or IIS7 classic mode, // visit http://go.microsoft.com/?LinkId=9394801 + + public class MvcApplication : System.Web.HttpApplication { public static void RegisterGlobalFilters(GlobalFilterCollection filters) @@ -17,6 +21,13 @@ public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + //routes.MapRoute( + // "NGon", + // "ngon", + // new { controller = "DynamicNGonJavascriptController", action = "NGon", id = UrlParameter.Optional }, null, + // new[] { typeof(DynamicNGonJavascriptController).Namespace }); + routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters diff --git a/NGon.SampleApplication/Views/Shared/_Layout.cshtml b/NGon.SampleApplication/Views/Shared/_Layout.cshtml index 8348fc8..e48ef17 100644 --- a/NGon.SampleApplication/Views/Shared/_Layout.cshtml +++ b/NGon.SampleApplication/Views/Shared/_Layout.cshtml @@ -5,7 +5,9 @@ @ViewBag.Title - @Html.IncludeNGon() + diff --git a/NGon.SampleApplication/Views/Web.config b/NGon.SampleApplication/Views/Web.config index 4c30ef2..3b39c06 100644 --- a/NGon.SampleApplication/Views/Web.config +++ b/NGon.SampleApplication/Views/Web.config @@ -28,7 +28,7 @@ - +