When i should USE HostingEnvironment.MapPath?
Please let me know in which condition i should use HostingEnvironment.MapPath?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nilesh ShahRank #42 · 34.2K reputationPosted Feb 20, 2017, 5:26 AM EST
JAYDIP PATIL51 reputationPosted Feb 20, 2017, 8:41 PM EST
xslFile = System.Web.Hosting.HostingEnvironment.MapPath(@"~/Reports/xsl/labels_single.xsl");
else
xslFile = System.Web.Hosting.HostingEnvironment.MapPath(@"~/Reports/xsl/labels.xsl");
Nilesh ShahRank #42 · 34.2K reputationPosted Feb 22, 2017, 10:11 AM EST