423,832 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,832 IT Pros & Developers. It's quick & easy.

what is root path

P: 1
Hi Every One,
what is the root path here

byte[] imgBinary = File.ReadAllBytes(rootPath + "Uploads\\imgname.JPG");

how i will find this.after i'm hosting in server what about root path.
Apr 28 '17 #1
Share this Question
Share on Google+
2 Replies


CroCrew
Expert 100+
P: 563
you can resolve to the root of your site by using something like this:

Expand|Select|Wrap|Line Numbers
  1. ResolveUrl("~/");
Hope that helps~
Apr 28 '17 #2

P: 1
In this case rootPath is a variable.
If your question is how to find what the root paths is you can use
Server.MapPath("~");
Will get you the root directory of the current application, as a path on the disk. E.g., C:\inetpub\...
Nov 30 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.