-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #11904 TypeFeatureProvider throws if a Razor Page has no PageMo…
…del (#11905) * Update ModularPageApplicationModelProvider.cs * Create HelloWorld.cshtml
- Loading branch information
Showing
2 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/OrchardCore.Modules/OrchardCore.Demo/Pages/HelloWorld.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@page "/helloworld" | ||
|
||
@functions | ||
{ | ||
public Task<IActionResult> OnGetAsync() | ||
{ | ||
return Task.FromResult<IActionResult>(Page()); | ||
} | ||
} | ||
|
||
@{ | ||
var title = "This is a razor 'Page' coming from OrchardCore.Demo that doesn't define any 'PageModel'."; | ||
var message = $"Date and time on the server: { DateTime.Now.ToString() }"; | ||
} | ||
|
||
@await Html.PartialAsync("Header", new { Title = title }) | ||
|
||
<h2>Hello World from @ViewContext.RouteData.Values["page"]</h2> | ||
|
||
<p> | ||
@message | ||
</p> | ||
<p> | ||
Date using the DateTimeShape: @await DisplayAsync(await New.DateTime(Utc: null, Format: T["MMMM dd, yyyy"].Value)) | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters