views:

74

answers:

1

in my site.master file, i have the following code:

<map name="indexMap">
  <area shape="rect" coords="3,9,59,24" href= "Home">
  <area shape="rect" coords="73,8,146,24" href="CourseBio">
  <area shape="rect" coords="168,8,235,24" href="ProShop">
  <area shape="rect" coords="257,7,336,24" href="ScoreCard">
  <area shape="rect" coords="358,8,480,28" href="OutingsandEvents">
  <area shape="rect" coords="502,7,573,27" href="Members">
  <area shape="rect" coords="589,8,666,28" href="Directions">
  <area shape="rect" coords="690,9,767,25" href="ContactUs">
</map>

Which works fine if i am at:

http://mysite.com/Home

but when i am at:

http://mysite.com/Home/Welcome

and i click on one of these links, it goes to:

http://mysite.com/Home/ProShop

instead of what i want, which is:

http://mysite.com/ProShop

how can i have links in the site.master that always go to controllers in the root location?

+2  A: 

Use Url.Content helper:

<area href="<%= Url.Content("~/ProShop") %>" shape="rect" coords="168,8,235,24">

or Url.RouteUrl:

<area href="<%= Url.RouteUrl(new { controller = "ProShop" }) %>" shape="rect" coords="168,8,235,24">
eu-ge-ne
Url.Content can't be found ? what namespace is this in ?
ooo
this doesn't seem to work from a master page
ooo
i realized the issue. . i wasn't using MVC master pages
ooo