I have the url:
http://localhost:1714/Message/Index
I want to show:
http://localhost:1714/Message/Index.html
How can I do it?
You need to modify Web.config to map requests for your HTML files to TransferRequestHandler.
like so:
...
...
This is explained here by Jon Galloway.
And put this to your RouteConfig:
public static void RegisterRoutes(RouteCollection routes)
{
...
routes.MapRoute("Default", "{controller}/{action}.html", new { controller = "Home", action = "Index" });
...
}
Than accessing http://localhost:{port}/Home/Index.html will send you to your Home page.