Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 775.4k

Error in using: (Server.MapPath("//ImageUrl")

Sep 5 2013 12:54 AM
Sir,  I am Getting an error  when using:-

string[] imageName = System.IO.Directory.GetFiles(Server.MapPath("/Photos"));

Getting error that :  An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.Server.get'   

Why getting this error, is the lack of namespace or reference?




Answers (6)