I have created and host nvc3 web app now problem is when I open my
Code
www.abc.combut I dont want that to be open when I open
Code
www.abc.comCode
index.htmin mvc3 Global.asax code:
C#
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}How can I render to
Code
http://www.abc.com/mypage.html
ravi kamboj7 reputationPosted Apr 11, 2012, 1:24 AM EDT
You can also use RedirectToAction methods.
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 11, 2012, 3:02 AM EDT
try below step.
1) Add new route top of all routes and in route pass your html page path (RegisterRoutes function of globle.asax).
routes.MapPageRoute("Default1", "", "~/myhtml.html");
2)Register html path tin web config.
....
....
now try..
hope this help.