0

My project (named Viper) seems to be working fine in debug mode on my dev PC.

The following line

<a href="@Url.Action("Index", "Setup")">Setup</a>

gives me the following link in the browser in dev, which works fine:

http://localhost/Viper/Setup

However, when I release this to the staging pc, when I look at the same link, I get this:

http://setup

Any idea why the release mode isn't capturing the virtual path?

tereško
  • 58,060
  • 25
  • 98
  • 150
Scottie
  • 11,050
  • 19
  • 68
  • 109

1 Answers1

2

why not use

@Html.ActionLink("Setup", "Index", "Setup")

if you need the relativa path you can use

@Url.Content("~/")

so in your case

<a href="@Url.Content("~/" + Url.Action("Index","Setup"))" >Setup</a>
mattematico
  • 669
  • 3
  • 14