You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/using-in-razor-pages-app.md
+54-56Lines changed: 54 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ If you wish to connect the Report Viewer to a Report Server instance, refer to t
33
33
34
34
## Manual Configuration in Razor Pages Apps
35
35
36
-
1. This tutorial uses the `Barcodes Report.trdp` report definitions file that must be located in a `Reports` folder inside the project.
36
+
1. This tutorial relies on having already created an **ASP.NET Core Razor Pages** application. If such is not present, follow the [Get started with Razor Pages in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start) as the first step.
37
37
1. Make sure that the app configuration inside the `Configure` method of the `Startup.cs` can serve static files:
38
38
39
39
````C#
@@ -43,7 +43,7 @@ app.UseStaticFiles();
43
43
44
44
1. Add a new razor page to the **Pages** directory of the *Razor Pages* application, and create a `ReportSourceModel` class in the `.cshtml.cs` file, which will be used to provide the report name and parameters.
45
45
46
-
````C#
46
+
````C#
47
47
public class ReportSourceModel : PageModel
48
48
{
49
49
private static readonly JsonSerializerOptions serializerOptions = new JsonSerializerOptions()
@@ -77,62 +77,60 @@ public class ReportSourceModel : PageModel
77
77
78
78
1. In the razor page's `.cshtml` file, initialize the HTML5 Report Viewer and pass the `ReportSourceModel` from the `@model`:
0 commit comments