Skip to content

Commit

Permalink
Set a default map route such that index.html i loaded if doing F5 fro…
Browse files Browse the repository at this point in the history
…m visual studio.
  • Loading branch information
jmp75 committed May 10, 2015
1 parent 3700f81 commit 9b42c3f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
14 changes: 9 additions & 5 deletions WebApplicationRdn/App_Start/RouteConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ 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 }
);
//routes.MapRoute(
// name: "Default",
// url: "{controller}/{action}/{id}",
// defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
//);

routes.MapRoute(
name: "Default",
url: "index.html");
}
}
}
9 changes: 9 additions & 0 deletions WebApplicationRdn/Controllers/CodeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using RDotNet.Graphics;
using Svg;
using WebApplicationRdn.Models;
using System.Web.Mvc;

namespace WebApplicationRdn.Controllers
{
Expand Down Expand Up @@ -102,4 +103,12 @@ private static RCode CreateErrorResult(RCode code, Exception ex)
return code;
}
}

public class HomeController : Controller
{
public ViewResult Index()
{
return View();
}
}
}

0 comments on commit 9b42c3f

Please sign in to comment.