How to get the Site Address from a page
-
Hello Everyone, I am working on this project, and I was wondering if there is a way to get the site address from a page. Lets say we are at www.codeproject.com, is there a way to get codeproject from URL so we know what site address we are at? Sincerely, The Major Rager
-
Hello Everyone, I am working on this project, and I was wondering if there is a way to get the site address from a page. Lets say we are at www.codeproject.com, is there a way to get codeproject from URL so we know what site address we are at? Sincerely, The Major Rager
use: Request.Url.Host
Regards, Rashida Jabeen http://www.akaas.net[^]
-
Hello Everyone, I am working on this project, and I was wondering if there is a way to get the site address from a page. Lets say we are at www.codeproject.com, is there a way to get codeproject from URL so we know what site address we are at? Sincerely, The Major Rager
Try this code line. Request.PhysicalApplicationPath, it return the physical address, but its something.. ;P
keep Learning and you never will be out of date...
-
use: Request.Url.Host
Regards, Rashida Jabeen http://www.akaas.net[^]
Thanks it works!