M
martin
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 wish to use the function "request.applicationpath" from inside my class.
In solution explorer I have right clicked on the references node and added a
reference to system.web.dll
in the class file I have added the following line
Imports System.Web.HttpRequest
and the main declartion looks like this
Namespace Utility
Public Class WebHelper
Public Function SiteRoot() As String
Dim strServer As String
strServer = Request.ApplicationPath()
Return strServer
End Function
End Class
End Namespace
however visual studio does not like the request.application path. I have
check the docs and unless I am wrong I believe this is a part or
Imports System.Web.HttpRequest which I have imported.
any help is appreciated.
thanks in advance.
martin.
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 wish to use the function "request.applicationpath" from inside my class.
In solution explorer I have right clicked on the references node and added a
reference to system.web.dll
in the class file I have added the following line
Imports System.Web.HttpRequest
and the main declartion looks like this
Namespace Utility
Public Class WebHelper
Public Function SiteRoot() As String
Dim strServer As String
strServer = Request.ApplicationPath()
Return strServer
End Function
End Class
End Namespace
however visual studio does not like the request.application path. I have
check the docs and unless I am wrong I believe this is a part or
Imports System.Web.HttpRequest which I have imported.
any help is appreciated.
thanks in advance.
martin.