Alternative of server.mappath() in my class

  • Thread starter Thread starter Han
  • Start date Start date
H

Han

Hello

I have an website having a class to be used by my .aspx, .asmx in the same
project. Also I have a common directory for XSL files. From .aspx I retrieve
the files by server.mappath("~..."). Now How do I do that in my class file?
Same way? or something another? The server.mapath() syntas in the class
raised compilation error.
 
Hello

I have an website having a class to be used by my .aspx, .asmx in the same
project. Also I have a common directory for XSL files. From .aspx I retrieve
the files by server.mappath("~..."). Now How do I do that in my class file?
Same way? or something another? The server.mapath() syntas in the class
raised compilation error.

Hi...

try using the bellow code...

System.Web.HttpContext.Current.Server.MapPath();

Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
 
Back
Top