I am having an issue w/ Url.Action not pointing to the correct localhost, can someone please advise how I can correct this?
The same info works fine for the ‘Html.ActionLink’
@<li>@Html.ActionLink(cattext, "Topic", "Tutorial", New With {.categorypassed = "INTRO"}, vbNull)</li>
Returns a link of :
http://localhost:62510/Tutorial/Topic?categorypassed=INTRO
But if I use this info as an ‘Url.Action’ :
<a data-role="button" data-transition="fade" href="@Url.Action("Topic", "Tutorial", New With {.categorypassed = "INTRO"}, vbNull)" data-icon="arrow-l" data-iconpos="left">Back</a>
It returns a bogus localhost:
1://localhost/Tutorial/Topic?categorypassed=INTRO
Leave out the last argument: vbNull.
Using this argument calls the method overload for specifying the protocol for the URL, such as “http” or “https”. Null is not a valid option, which is probably why you got “1://” in the output. Web servers handle the protocols on different port numbers, so changing protocols will cause you to change ports in the URL.
It’s sounds like this is the overload for URL.Action you are looking for: