In Javascript:
var urlpath = "http://" + window.location.host + "/" +
window.location.pathname.replace(/^\/([^\/]*).*$/, '$1') + "/";
Server Side:
<%
/* Global Variables */
string hostUrl = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath;
%>
var urlpath = "http://" + window.location.host + "/" +
window.location.pathname.replace(/^\/([^\/]*).*$/, '$1') + "/";
Server Side:
<%
/* Global Variables */
string hostUrl = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath;
%>
No comments:
Post a Comment