@{
var host = Url.Content("~/");
}
<script type="text/javascript">
var host = "@host";
$(function () {
if ($("#Company" != null)) {
$("#companyselect").change(function () {
var newuri = host + "eg/" + $("#companyselect option:selected").text() + "/Comps";
window.location.url = newuri;
}
);
}
});
</script>
newuri = /bo/eg/airline inc/5
But browser always redirects to /eg/airline inc/5
Could it be that you are missing the hostname? In your current setup it looks like the hostname would evaluate to simply “/”;
For example you could try: