Using Server.MapPath in a Public Shared Function?

G

Guest

Is it possible to use Server.MapPath in a Public Shared Function?

Using the following code in this context - shows "Sever" as not declared -

Public Shared Function Back_End_State() As Integer
Dim FILENAME As String = Server.MapPath("SomeText.txt")

- what can I do to fully qualify it?
 
R

Rad [Visual C# MVP]

Is it possible to use Server.MapPath in a Public Shared Function?

Using the following code in this context - shows "Sever" as not declared -

Public Shared Function Back_End_State() As Integer
Dim FILENAME As String = Server.MapPath("SomeText.txt")

- what can I do to fully qualify it?

Probably need a reference to System.Web
 

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

Top