469,616 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

what is root path

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
2 3117
CroCrew
564 Expert 512MB
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
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.

Similar topics

1 post views Thread by rick | last post: by
2 posts views Thread by Steve Peterson | last post: by
2 posts views Thread by hb | last post: by
3 posts views Thread by Dave | last post: by
2 posts views Thread by Hector Y. Martinez | last post: by
reply views Thread by ad | last post: by
3 posts views Thread by nutz | last post: by
6 posts views Thread by John Kotuby | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.