• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

declare and access Server.MapPath("xyz.htm") from inside a custom class

How can I declare and access

Server.MapPath("xyz.htm")

from inside a custom class?

Server doesn't seem to be recognized beyond the page...

Thanks!
0
codequest
Asked:
codequest
1 Solution
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
You would have to add a reference to System.Web to your project and then use

HttpContext.Current.Server.MapPath( )

Ben.
0
 
codequestAuthor Commented:
Works good.  Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now