Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > request in namespace

Thread Tools

request in namespace

Posts: n/a

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 ---- if a website -- 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.



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR CS0234: The type or namespace name 'DataAccessHelper' does not exist in the namespace 'BCC' (are you missing an assembly reference?) ASP .Net 0 01-06-2006 11:31 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM
Namespace: Is it a scope or a namespace? Anonymous C++ 3 08-18-2003 01:31 PM
Help:Why can't I use namespace System.Web? It is said that this namespace doesn't exist. But it should exist. ASP .Net 1 07-29-2003 04:31 PM