Use Server object in Class file

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I have created CLASS file (.cs) in ASP.NET. I need to get the server path
in this cs file, so i use "Server.MapPath()". But I got "The type or
namespace name 'Server' could not be found (are you missing a using
directive or an assembly reference?)". Is it possible to use Server object
in cs file?? What namespace should I include in the cs file?? Or any other
way to get the Server path in cs file??


Million Thanks
 

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

Back
Top