Controller action method-
public ActionResult Index()
{
ViewBag.BaseUrl = "http://localhost:50926/";
return View();
}
In ViewPage-
<a href="@ViewBag.BaseUrl/page.html">One</a>
This generates url as follows (notice the double slash at end)
"http://localhost:50926//page.html"
How to get rid of double slash? Please note that BaseUrl value can not be changed.