What is the purpose of Server.MapPath method in Asp.Net
Rohatash Kumar
In Asp.Net Server.MapPath method maps the specified relative or virtual path to the corresponding physical path on the server. Server.MapPath takes a path as a parameter and returns the physical location on the hard drive. SyntaxSuppose your Text files are located at D:\project\MyProject\Files\TextFilesIf the root project directory is MyProject and the aspx file is located at root then to get the same path use code//Physical path of TextFilesstring TextFilePath=Server.MapPath("Files/TextFiles");