How to get Host Url in javascript or Jquery


Monday, August 2, 2010

Sometime, you will be in need of only host part of URL, like

if you url is http://www.induway.com/aboutus.aspx

then if you wish to have only "induway.com" out of complete url, then you can use this code to get host url
in javascript or jquery.


'<%=Request.Url.Host%>'


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Senior Asp.Net Developer

Email: raj143svmit@gmail.com
e-Procurement Technologies Ltd (India)
www.abcprocure.com


1 comment :

Anonymous said...

usefull link :

http://convert-doc.com/ - to convert any doc type to any formate.

http://iconfinder.com/ - you can find nice icon here