Category - Core
Results 6 - 10 of 94
18 Nov 2020 18 Nov 2020 0 Comments  183 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Current Date and Time in Razor Page (cshtml) in ASP.Net Core Razor Pages.

The Current Date and Time will be determined inside the Handler method which will be later sent to the Razor Page for display using jQuery AJAX in ASP.Net Core Razor Pages.
18 Nov 2020 18 Nov 2020 0 Comments  202 Views
Here Mudassar Ahmed Khan has explained with an example, how to use the OnPost handler method in ASP.Net Core Razor Pages.

The OnPost handler method is used for handling Form Submissions and the name of the OnPost handler method is specified on the Submit Button used to submit the Form using the asp-page-handler attribute in ASP.Net Core Razor Pages.
18 Nov 2020 18 Nov 2020 0 Comments  179 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind Model Properties in ASP.Net Core Razor Pages.

The value of the Name attribute of the Field e.g. a TextBox is used as the name of the Property and then the Property is decorated with BindProperty attribute which then binds the property to the Field in ASP.Net Core Razor Pages.
18 Nov 2020 18 Nov 2020 0 Comments  190 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from Page Model to Razor Page (cshtml) in ASP.Net Core Razor Pages.

The data will be set into a public property inside the Page Model and then using Razor syntax the data will be fetched inside the Razor Page (cshtml) in ASP.Net Core Razor Pages.
17 Nov 2020 17 Nov 2020 0 Comments  204 Views
Here Mudassar Ahmed Khan has explained with an example, how to loop through Model properties using FOR EACH loop in ASP.Net Core MVC.

The Entity Framework will be used to fetch the data from Database and populate the Model class properties.

Then inside the View, using a FOR EACH loop the Model items will be traversed and data will be displayed using HTML Table in ASP.Net Core MVC.
Results 6 - 10 of 94