Server.Mappath in C# classlibrary

System.Web.Hosting.HostingEnvironment.MapPath
You can get the base path by using the following code and append your needed path with that.
string  path = System.AppDomain.CurrentDomain.BaseDirectory;
Server.MapPath(Path.Combine("~/PdfFiles/", fname))

Comments

Popular posts from this blog

Provision AWS EC2 Instance and RDS with Terraform, and Deploy Spring Boot App to EC2 Instance via GitHub Action Pipeline

JQuery UI Autocomplete, custom HTML structure for result?

Easy Ui Jquery easyui-textbox change onChange event