Handler is calling _Layout page and Get() method
When calling a handler from cshtml page (using Razor project) why it is doing full page refresh by going to public void OnGet() method and then it go to public IActionResult OnPostExportCSV(int id)? I was thinking by callling the hadler ExportCSV it will directly goto call OnPostExportCSV(int id)
AspNet Core Custom Page Model not Able to Access ClaimPrincipal.User in Razor Page
I am new to ASP.Net Core and have a custom PageModel (MTNCBasePageModel) that inherits from the PageModel abstract class.
How to return ViewDataDictionary with Partial
I have a razor pages handler
Asp.net core razor pages BindProperty collections List not Working
My plan is that I fill a list of data in OnGet and after sending it to the html page, I checkMark some lines and Fill some input on table, and finally it is posted to the server. But in OnPost, the collection is empty and does not return anything:
But in onpost, the collection is empty and does not return anything:
How to render a RazorPage (a PageModel) to Html or how to nest Razor Pages
As weird as may sound, is it possible to render a Razor Page (a PageModel derived class) to Html?
Html is displayed as a plain text in Asp.Net Core Razor pages
I am working on Asp.Net Core 6.0 MVC Razor pages. On the Login.cshtml page, I want to show the following error message when the user tries to login with in invalid credential: Invalid: User Name and/or Password. The problem is this message is displayed as a text instead of an html with the “User Name” and “Password” in bold. The following is my C# code in Login.cshtml.cs
How to add Metadata to Razor Page view
With MinimalApi you can register MetaData with the route like below.
A value from my form in my index doesn’t get passed to the backend
I am making asp.net core program with razor pages where I want to send data from my index.cshtml page to the indes.cshtml.cs, I am using the asp-for method in my form to pass the value to a variable in the .cs file but the value never gets passed. this is what the code looks like.