How to hide address bar in mvc web application? I want to hide that in every view. I have tried by doing this code in javascript:
function popup(pageURL, title, popupWidth, popupHeight) {
window.moveTo(0, 0);
var targetPop = window.open(pageURL, title, 'status=no, tmenubar=no, scrollbars=yes, maximize=yes, resizable=no, width=' + screen.availWidth + ',height=' + screen.availHeight, "_blank");
targetPop.moveTo(0, 0);
targetPop.focus();
}
i call that function on _Layout :
<body onload="popup()">
</body>
i don't know how to get current url to pass it to the "pageURL" parameter. or do i do that in a wrong way?
can you guys give me better solutions?
EDITED:
when first time i run the app, it will show the main _Layout and the Index view inside (Renderbody()). how i make the main layout to hide the address bar? and so if i navigate to another view
Thank You guys. Sorry for My bad English.