We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62a2ea7 commit 812ed21Copy full SHA for 812ed21
How to/Refer resource url locally/CoreSample/Pages/Index.cshtml
@@ -2,10 +2,14 @@
2
@model IndexModel
3
@{
4
ViewData["Title"] = "Home page";
5
+ var originUrl = $"{Request.Scheme}://{Request.Host}{Request.PathBase}";
6
+ var document = originUrl + "/PDF_Succinctly.pdf";
7
+ var resourceUrl = originUrl + "/ej2-pdfviewer-lib";
8
}
9
10
+
11
<div>
- <ejs-pdfviewer id="pdfviewer" style="height:600px" documentPath="https://localhost:44311/PDF_Succinctly.pdf" resourceUrl="https://localhost:44311/ej2-pdfviewer-lib">
12
+ <ejs-pdfviewer id="pdfviewer" style="height:600px" documentPath=@document resourceUrl=@resourceUrl>
13
</ejs-pdfviewer>
14
</div>
15
0 commit comments