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?

4

1 回答 1

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>
于 2012-10-03T16:54:29.780 回答