Domain: domain.com
I want to create a url like : domain.name
OR
domain/name
not like : domain/controller/action/string
Home Controller { public ActionResult Index(string name) { return View(); } }
how can I do that, kindly suggest.
thanks.
Hi varun3752,
Refer below links.
https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing/creating-custom-routes-cs
https://www.codeproject.com/articles/299531/custom-routes-for-mvc-application
This is what I am looking for.
By the way thanks for your quick response.
routes.MapRoute( name: "Profile", url: "{id}", defaults: new { controller = "Home", action = "Index"} );
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.