6
Reply

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

Bineesh  VP

Bineesh VP

Sep 5 2013 12:54 AM
2k
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)