Skip to content

Commit 812ed21

Browse files
committed
931453: removed hardcoded localhost url
1 parent 62a2ea7 commit 812ed21

File tree

1 file changed

+5
-1
lines changed
  • How to/Refer resource url locally/CoreSample/Pages

1 file changed

+5
-1
lines changed

How to/Refer resource url locally/CoreSample/Pages/Index.cshtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
@model IndexModel
33
@{
44
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";
58
}
69

10+
711
<div>
8-
<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>
913
</ejs-pdfviewer>
1014
</div>
1115

0 commit comments

Comments
 (0)