Harshal Thakre

Harshal Thakre

  • 1.5k
  • 241
  • 77.6k

how to check file exist or not on serverpath in global.asax

Jul 24 2014 7:24 AM
file exist at particular location :

1.below code is working in any aspx.cs file
2.but it's not working in global.asax.

if (File.Exists(HttpContext.Current.Server.MapPath("~/AutoMailSend.htm")))
      {


      }

so please tell me how can i use this code in global file