Jane,
I used Server.MapPath(mypath) method to find an absolute
path of a file on a web server. But I got error message -
Name 'Server' is not declared. I have imported System.IO.
Does someone know any tricky here?
Where's your code located? Server is a property of the
System.Web.UI.Page class so you have to put the code inside your page
class, or pass a reference to the Page object to the method where you
want to use Server.MapPath.
System.IO has nothing to do with it.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.