User1266884534 posted
Hello,
I have a beginner question on the physical path of a file.
The files are in the app_Data folder. The first line of code works AND that path is fully resolved.
How can I have a relative path that will work?
FULL PHYSICAL PATH (Resolves and loads the object correctly).
JsonSource = new UriJsonSource(new Uri(@"C:\source\repos\DevExtremeWebApp\DevXWebDoc\App_Data\FirstInvHeaderwithDetail.json"))
RELATIVE PATH 1 (Doesn't resolve and throws a runtime error.
JsonSource = new UriJsonSource(new Uri(@"\App_Data\SecondInvHeaderwithDetail.json"))
RELATIVE PATH 2 (Doesn't resolve and throws a runtime error. Notice the ~ sign.
JsonSource = new UriJsonSource(new Uri(@"~\App_Data\SecondInvHeaderwithDetail.json"))