Any smart way of doing a \"root\" based path referencing in JavaScript, just the way we have ~/ in ASP.NET?
If you want to use it in HTML Still you can use ~, see this
href = @Url.Content("~/controllername/actionName")
See the check box click event in my MVC Application
@Html.CheckBoxFor(m=>Model.IsChecked,
new {@onclick=@Url.Content("~/controller/action("+ @Model.Id + ", 1)"),
@title="Select To Renew" })