Category - Core
Results 81 - 100 of 201
29 Jan 2021 29 Jan 2021 0 Comments  2525 Views
Here Mudassar Ahmed Khan has explained with an example, how to use AntiForgeryToken with jQuery Unobtrusive AJAX in ASP.Net Core Razor Pages.

The jQuery Unobtrusive AJAX library does not support adding headers to the request and hence it is not possible to send AntiForgeryToken.

Thus, the possible way is to make use of normal jQuery AJAX function and then send the AntiForgeryToken by adding it to the request headers.
29 Jan 2021 29 Jan 2021 0 Comments  7166 Views
Here Mudassar Ahmed Khan has explained with an example, how to use jQuery Unobtrusive AJAX in ASP.Net Core Razor Pages.

The POST method of the Razor Page will be called using jQuery AJAX Unobtrusive library and JSON from HTML in ASP.Net Core.
22 Jan 2021 20 Apr 2021 2 Comments  12762 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Hidden Fields with Razor Pages in ASP.Net Core.

This article will explain how to create Hidden Fields using Model class, set its value and then retrieve data from Razor Page inside POST Handler method in ASP.Net Core.
19 Jan 2021 19 Jan 2021 0 Comments  9910 Views
Here Mudassar Ahmed Khan has provided a small tutorial on how to create a Sample Web Application program in ASP.Net Core.

This article makes use of Visual Studio for developing the ASP.Net Core Razor Pages Sample Web Application program.
15 Jan 2021 15 Jan 2021 0 Comments  3888 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass Model data from Controller to View in ASP.Net Core MVC.

The data from the SQL Server Database will be fetched using Entity Framework and populated into Model which will be later sent to the View in ASP.Net Core MVC.
15 Jan 2021 15 Jan 2021 0 Comments  4522 Views
Here Mudassar Ahmed Khan has explained with an example, how to change the default Camel Case JSON Output in ASP.Net Core.

The default Camel Case JSON property names tend to break the Client Side JavaScript and hence in order to remove it, the default JSON Serialization needs to be replaced with Newtonsoft.Json Serialization in ASP.Net Core.
13 Jan 2021 29 Apr 2021 0 Comments  22532 Views
ASP.Net  AJAX  jQuery  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to submit (post) a Form and send data from View to Controller using jQuery AJAX in ASP.Net Core MVC.

This article will explain how to create Form Fields and then send data from View to Controller using Form Collection and jQuery AJAX in ASP.Net Core MVC.
02 Jan 2021 02 Jan 2021 0 Comments  17512 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to set use Connection String from AppSettings.json with DbContext class in.Net Core and ASP.Net Core MVC.

Inside the Startup class, the Connection String is read from the AppSettings.json file and is used to add the DbContext service.
02 Jan 2021 02 Jan 2021 0 Comments  1684 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to read (retrieve) Configuration value in .Net Core and ASP.Net Core MVC.

In .Net Core, the Configuration values are stored in AppSettings.json file.
02 Jan 2021 02 Jan 2021 0 Comments  7795 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to read value from AppSettings.json file in .Net Core and ASP.Net Core MVC.
02 Jan 2021 02 Jan 2021 0 Comments  17637 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Connection String with Windows Authentication in AppSettings.json in .Net Core and ASP.Net Core MVC.

In a Connection String with Windows Authentication, the Integrated Security property is set to TRUE.
02 Jan 2021 02 Jan 2021 0 Comments  17977 Views
Here Mudassar Ahmed Khan has explained with an example, how to set SQL Server Connection String in AppSettings.json in .Net Core and ASP.Net Core MVC.

SQL Server Database has two types of Connection Strings i.e. Windows Authentication and SQL Server Authentication.
02 Jan 2021 02 Jan 2021 0 Comments  11260 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Connection String with SQL Server Authentication in AppSettings.json in .Net Core and ASP.Net Core MVC.

In a Connection String with SQL Server Authentication, the User Id and Password of the SQL Server Database is specified.
02 Jan 2021 02 Jan 2021 0 Comments  4539 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to read (get) value from AppSettings.json file inside Startup.cs class in .Net Core and ASP.Net Core MVC.

Microsoft has replaced System.Configuration class with IConfiguration interface in .Net Core 2.0.
22 Dec 2020 22 Dec 2020 0 Comments  5108 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from one Action method to another Action method in ASP.Net Core MVC.

TempData is derived from the TempDataDictionary class and is basically a Dictionary object used for passing data between Action methods of same Controller or even other Controllers in ASP.Net MVC Core.
22 Dec 2020 22 Dec 2020 0 Comments  2984 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from one Controller to another Controller in ASP.Net Core MVC.

TempData is derived from the TempDataDictionary class and is basically a Dictionary object used for passing data from Controller to View or from Controller to Controller.
19 Dec 2020 19 Dec 2020 0 Comments  19339 Views
Here Mudassar Ahmed Khan has explained with an example, how to refresh a page after submit (post) in ASP.Net Core Razor Pages.

If the Browser is refreshed using F5 button after the Form is submitted (in other words after PostBack operation), the submitted data is resubmitted to Server.

Thus to prevent such behavior, the Page is redirect to same page after Form submit (post).
19 Dec 2020 19 Dec 2020 0 Comments  2559 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained a short tutorial with example on how to use TempData in ASP.Net Core MVC.

TempData is derived from the TempDataDictionary class and is basically a Dictionary object used for passing data from Controller to View or from Controller to Controller.
18 Dec 2020 18 Dec 2020 0 Comments  10407 Views
Here Mudassar Ahmed Khan has explained with an example, how to use the asp-page-handler attribute in ASP.Net Core Razor Pages.

The asp-page-handler attribute is assigned to the Submit Button and is used to all the OnPost handler method in ASP.Net Core Razor Pages.
18 Dec 2020 18 Dec 2020 0 Comments  17784 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to read files from wwwroot Directory in Controller in ASP.Net Core MVC.

The files will be read using the File class from the wwwroot Directory (Folder) and will also be downloaded in ASP.Net Core MVC.
Results 81 - 100 of 201