c# - Why I can't use Server.MapPath() in my class? -
i have following problem when try call server.mappath(); inside class.
it give me following error message:
error 3 name 'server' not exist in current context c:\develop\earlywarning\public\implementazione\ver2\pdfreport\itextdocumentbase.cs 122 13 pdfreport
so think maybe have add namespace related server object looking on official documentation can't found no related namespace: http://msdn.microsoft.com/en-us/library/ms525541%28v=vs.90%29.aspx
why? can solve?
tnx
do in class:
system.web.httpcontext.current.server.mappath("relative path");
Comments
Post a Comment