request in namespace

M

martin

Hi,

I have created a namespace and a class as an additional project. I have made
a referenece to my new namespace inside my web project and am happily using
my new namespace. However I have one small problem.

I wish to create a method inside my namespace to return the URL of the root
of the site. To do this I need to use the methods


request.servervarianle("SERVER_NAME ") and request.applicationpath()

however these two functions are not availible from my namespace, even though
I have imported seystem.web

Please could somebody explain how I access the "request method " from a
class, what namespace must I import, it lokks to me like this functionality
is not allowed in a class..

I am tryng to get the url to the root of my site

for example

http://www.mysite.com/ ---- if a website

http://www.mysite.com/virtualroot/ -- if a virtual directory

http://servername/ -- if a website on my local server

http://servername/virtualroot/ if a virtual dir on my local server

any help is appreciated.

cheers

martin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top