I have an ASP.NET MVC app. I am using Razor in my views. Due to my IT dept. the app sits at a relative root like http://ourdomain.com/appRoot instead of at the top of the domain like http://ourdomain.com. The other challenge here is, appRoot is not static. It actually changes. For that reason, I need to get the name of the relative root via Razor. Currently, I have something like the following:
<input id="hiddenElem" type="hidden" value="12345" />
<script type='text/javascript'>
function doThis() {
var id = $('#hiddenElem').val();
var nextUrl = '@(Request.?)' + '/path/' + id;
alert(nextUrl);
}
</script>
When doThis is called, I want to see the alert window to display /appRoot/path/12345. What do I put into the Razor block associated with nextUrl to get the relative root?