473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

request in namespace

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.



Nov 18 '05 #1
0 892

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Reena | last post by:
Hi, Working on .NET 2003. Using C# as server code. I have created a class with following code... using System; using System.Data.OracleClient; using System.Web; using...
1
by: Kueishiong Tu | last post by:
I have a .net window form application but I have to get data from various web sites. How do I make Http request (preferrably via post method) from a window form to get the data from those web...
6
by: Pete | last post by:
Hi, I am writing a pre-handler page for aspx pages, in which I want to call a custom method on the code-behind class file for the aspx page. In order to do this I need to somehow get the...
2
by: martin | last post by:
Hi, I am developing a class to help my asp.net application along. The class is part of a seperate project although this project is included in the same solution as my main web application. I...
5
by: Filip | last post by:
Hello, (ASP.NET c#) I want to put some common functions into one class and within this class I need to have access to the Session, Request and Response. This class is not page behind file! I...
11
by: myhyli | last post by:
I want to get some files from another remote server,so: 1.at first, I use xmlhttp(activeXObject),but I found it will not work with some url like: http://rss.xinhuanet.com/rss/it.xml , and some...
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
1
by: Dheepu Kumar1 | last post by:
We are using WSDL in soapclient to access the java web service.The soapclient request is not formed as required by the service. Namespace is not included in one ComplexType element(<GSTBTReq>) in...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.