Generate real Server URL (not localhost)
-
22-04-2021 - |
Вопрос
Hi,
Im using the following to generate full URL :
urlHelper.Action("Detail", "Ad", null, "http") + "?id=" + adId.ToString();
This will however return a localhost URL even when the webpage is placed on a public server (www.mywebpage.com)?
Im using ASP.NET MVC 2
BestRegards
Решение
This suddenly started to work, I dont know why it did not work at first.
Не связан с StackOverflow