Accessing Serever.MapPath in class file?

Posted by Raja under ASP.NET category on | Views : 3180
Generally Server.MapPath works in the code behind page but if we move to class file, it expects the namespace to be used and by default it doesn't exists in the class file. So use prefix it with HttpContext.Current and it will work.


Thank you

Comments or Responses

Login to post response