Mvc Link Reference

Modified on Tue, 12 Dec 2023 at 12:47 PM

Modern UrlLegacy UrlRazor SyntaxToken SyntaxControllerAction
/account/account.aspx@Url.Action("Index", "Account")(!Url ActionName='Index' ControllerName='Account' !)AccountIndex
/account/createcreateaccount.aspx@Url.Action("Create", "Account")(!Url ActionName='Create' ControllerName='Account' !)AccountCreate
/account/signinsignin.aspx@Url.Action("SignIn", "Account")(!Url ActionName='SignIn' ControllerName='Account' !)AccountSignIn
/account/signoutsignout.aspx@Url.Action("SignOut", "Account")(!Url ActionName='SignOut' ControllerName='Account' !)AccountSignOut
/address/address.aspx@Url.Action("Index", "Address")(!Url ActionName='Index' ControllerName='Address' !)AddressIndex
/bestsellers/bestsellers.aspx@Url.Action("Index", "BestSellers")(!Url ActionName='Index' ControllerName='BestSellers' !)BestSellersIndex
/contactus/contactus.aspx@Url.Action("Index", "ContactUs")(!Url ActionName='Index' ControllerName='ContactUs' !)ContactUsIndex
/downloads/downloads.aspx@Url.Action("Index", "Downloads")(!Url ActionName='Index' ControllerName='Downloads' !)DownloadsIndex
/home/default.aspx@Url.Action("Index", "Home")(!Url ActionName='Index' ControllerName='Home' !)HomeIndex
/news/news.aspx@Url.Action("Index", "News")(!Url ActionName='Index' ControllerName='News' !)NewsIndex
/recentadditions/recentadditions.aspx@Url.Action("Index", "RecentAdditions")(!Url ActionName='Index' ControllerName='RecentAdditions' !)RecentAdditionsIndex
/recurringorder/n/a@Url.Action("Index", "RecurringOrder")(!Url ActionName='Index' ControllerName='RecurringOrder' !)RecurringOrderIndex
/requestcatalog/requestcatalog.aspx@Url.Action("Index", "RequestCatalog")(!Url ActionName='Index' ControllerName='RequestCatalog' !)RequestCatalogIndex
/search/search.aspx@Url.Action("Index", "Search")(!Url ActionName='Index' ControllerName='Search' !)SearchIndex
/search/advancedsearchsearchadv.aspx@Url.Action("AdvancedSearch", "Search")(!Url ActionName='AdvancedSearch' ControllerName='Search' !)SearchAdvancedSearch
/shoppingcart/addtocartaddtocart.aspx@Url.Action("AddToCart", "ShoppingCart")(!Url ActionName='AddToCart' ControllerName='ShoppingCart' !)ShoppingCartAddToCart
/shoppingcart/bulkaddtocartformtableorder_process.aspx@Url.Action("BulkAddToCartForm", "ShoppingCart")(!Url ActionName='BulkAddToCartForm' ControllerName='ShoppingCart' !)ShoppingCartBulkAddToCartForm
/sitemap/sitemap.aspx, sitemap2.aspx@Url.Action("Index", "SiteMap")(!Url ActionName='Index' ControllerName='SiteMap' !)SiteMapIndex
/sitemapfeed/googleindex.aspx@Url.Action("Index", "SiteMapFeed")(!Url ActionName='Index' ControllerName='SiteMapFeed' !)SiteMapFeedIndex
/topic/{TopicName}t-{TopicName}.aspx@Url.BuildTopicLink("{TopicName}")(!TopicLink Name='{TopicName}' !)TopicDetail
/product/{ProductId}/{SearchEngineName}p-{Productid}-{SearchEngineName}.aspx@Url.BuildProductLink({ProductId},"{SearchEngineName}")(!ProductLink ProductId='{ProductId}' SEName='{SearchEngineName}' !)ProductDetail
/category/{EntityID}/{SearchEngineName}c-{EntityId}-{SearchEngineName}.aspx@Url.BuildEntityLink("Category", {EntityId},"{SearchEngineName}")(!CategoryLink CategoryId='{EntityId}' SEName='{SearchEngineName}'!)EntityDetail
/section/{EntityID}/{SearchEngineName}s-{EntityId}-{SearchEngineName}.aspx@Url.BuildEntityLink("Section", {EntityId},"{SearchEngineName}")(!SectionLink SectionId='{EntityId}' SEName='{SearchEngineName}'!)EntityDetail
/manufacturer/{EntityID}/{SearchEngineName}m-{EntityId}-{SearchEngineName}.aspx@Url.BuildEntityLink("Manufacturer", {EntityId},"{SearchEngineName}")(!ManufacturerLink ManufacturerId='{EntityId}' SEName='{SearchEngineName}'!)EntityDetail
/categorycategories.aspx@Url.Action("Index", "Entity", new { entityType = "category" })(!Url actionname='index' controllername='entity' entitytype='category' !)EntityIndex
/sectionsections.aspx@Url.Action("Index", "Entity", new { entityType = "section" })(!Url actionname='index' controllername='entity' entitytype='section' !)EntityIndex
/manufacturermanufacturers.aspx@Url.Action("Index", "Entity", new { entityType = "manufacturer" })(!Url actionname='index' controllername='entity' entitytype='manufacturer' !)EntityIndex


Linking to the minicart modal

<a href="#" data-toggle="modal" data-target="#minicart-modal">
    @Html.StringResource("minicart.viewCart")
</a>

Linking to the wishlist modal

<a href="#" data-toggle="modal" data-target="#miniwish-modal">
    @Html.StringResource("miniwish.viewCart")
</a>


Invoking a product with less than a complete URL 

Invoking a product with less than a complete URL is possible as long as the minimum of entity identifier (p, c, s, m etc.) followed by -ID#.aspx are provided.

 

Example: www.exampledomain.com/p-123.aspx

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article