what is root path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sadiqsha
    New Member
    • Apr 2017
    • 1

    what is root path

    Hi Every One,
    what is the root path here

    byte[] imgBinary = File.ReadAllByt es(rootPath + "Uploads\\imgna me.JPG");

    how i will find this.after i'm hosting in server what about root path.
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    you can resolve to the root of your site by using something like this:

    Code:
    ResolveUrl("~/");
    Hope that helps~

    Comment

    • DevBurgas
      New Member
      • Nov 2017
      • 1

      #3
      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\...

      Comment

      Working...