New Additions
24 Nov 2020 24 Nov 2020 0 Comments  32 Views
Here Mudassar Ahmed Khan has explained with an example, how to create and consume a Web API PUT Action method in ASP.Net MVC Razor.

HTTP PUT method is used to update an existing record in the data in the RESTful API.

This article will illustrate how to create a PUT Action method in Web API and use it for updating records in Database using Entity Framework in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  28 Views
Here Mudassar Ahmed Khan has explained with an example, how to call (consume) Web API from MVC Controller using HttpClient class in ASP.Net MVC Razor.

This article will illustrate how to call a Web API GET method with its URL using HttpClient class in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  31 Views
Here Mudassar Ahmed Khan has explained with an example, how to call Web API from MVC Controller in same Solution (Project) in ASP.Net MVC Razor.

This article will illustrate how to call a Web API method using its URL from another project in same Project or same Solution in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  32 Views
Here Mudassar Ahmed Khan has explained with an example, how to create and consume a Web API POST Action method in ASP.Net MVC Razor.

This article will illustrate how to create a POST Action method in Web API and use it for inserting records in Database using Entity Framework in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  30 Views
Here Mudassar Ahmed Khan has explained with an example, how to update data into Database using Web API and Entity Framework in ASP.Net MVC Razor.

When the Update Button is clicked, the UpdateCustomer Action method of the Web API is called using jQuery AJAX and the details of Customer are sent as JSON object.

Finally, a Boolean response is sent to the View which indicates that the record was successfully updated or not.
24 Nov 2020 24 Nov 2020 0 Comments  34 Views
Here Mudassar Ahmed Khan has explained with an example, how call (consume) Web API GET method in ASP.Net MVC Razor.

The Web API Action method will be called inside the MVC Controller’s Action method using HttpClient class in ASP.Net MVC Razor.
24 Nov 2020 24 Nov 2020 0 Comments  30 Views
Here Mudassar Ahmed Khan has explained with an example, how to insert data into Database using Web API and Entity Framework in ASP.Net MVC Razor.

When the Add Button is clicked, the InsertCustomer Action method of the Web API is called using jQuery AJAX and the details of Customer are sent as JSON object.

Finally, after insertion the ID of the inserted Customer record is returned back to the View in ASP.Net MVC Razor.
23 Nov 2020 23 Nov 2020 0 Comments  81 Views
Here Mudassar Ahmed Khan has explained with an example, how to create Connection String in C# and VB.Net.

This article will illustrate how to create connection string for Windows and SQL Server based authentication for Windows Forms and Console Applications in C# and VB.Net.
21 Nov 2020 21 Nov 2020 0 Comments  98 Views
Here Mudassar Ahmed Khan has explained with an example, how to do a Database Connection without using Entity Framework in ASP.Net Core Razor Pages.

This article will illustrate how to connect to Database using ADO.Net and fetch data from Database using SqlDataReader in ASP.Net Core Razor Pages.
21 Nov 2020 21 Nov 2020 0 Comments  78 Views
Here Mudassar Ahmed Khan has explained with an example, how to use ADO.Net Database Connection in ASP.Net Core Razor Pages.

This article will illustrate how to connect to Database using ADO.Net and fetch data from Database using SqlDataReader in ASP.Net Core Razor Pages.
21 Nov 2020 21 Nov 2020 0 Comments  95 Views
Here Mudassar Ahmed Khan has explained with an example, how to populate (bind) DropDownList using ADO.Net in ASP.Net Core Razor Pages.

The records from the Database will be fetched from Database Table using ADO.Net into Model class object and then the Model is used to populate the DropDownList using the new ASP.Net Tag Helpers in ASP.Net Core Razor Pages.
21 Nov 2020 21 Nov 2020 0 Comments  101 Views
Here Mudassar Ahmed Khan has explained with an example, how to retrieve data from Database and displaying in DropDownList in ASP.Net MVC Core.

The records from the SQL Server Database will be retrieved from Table using ADO.Net into Model class object and then the Model is used to display the data in the DropDownList in ASP.Net Core MVC.
21 Nov 2020 21 Nov 2020 0 Comments  87 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Auto Increment Primary Key with Entity Framework Database First using C# in ASP.Net MVC Razor.

When the Form is submitted, the value of the submitted Form fields will be fetched using Entity Framework Model class object and will be inserted into database using Entity Framework. After successful insert, the ID of the last inserted record fetched using SCOPE_IDENTITY will be displayed using JavaScript Alert Message Box.
20 Nov 2020 20 Nov 2020 0 Comments  92 Views
Here Mudassar Ahmed Khan has explained with an example, how to call Web API from another Project in ASP.Net MVC Razor.

The Web API 2 Controller’s Action method will fetch records from the SQL Server Database using Entity Framework in ASP.Net MVC Razor.

The Web API 2 Controller’s Action method will be called using WebClient class from another MVC Project using the Web API URL.
19 Nov 2020 19 Nov 2020 0 Comments  179 Views
Here Mudassar Ahmed Khan has explained with an example, how to create Web API in ASP.Net C# with SQL server database in ASP.Net MVC Razor.

The Web API Controller method will fetch records from SQL server database using Entity Framework in ASP.Net MVC Razor.
19 Nov 2020 19 Nov 2020 0 Comments  115 Views
Here Mudassar Ahmed Khan has explained with an example, how to reverse a String without using in-built String function in C# and VB.Net.

This article will illustrate how to reverse a String using a simple FOR LOOP in C# and VB.Net.
19 Nov 2020 19 Nov 2020 0 Comments  141 Views
Here Mudassar Ahmed Khan has explained a tutorial with example, how to perform Web API CRUD with Entity Framework Database First approach in ASP.Net MVC Razor.

The Entity Framework will be used to connect to the SQL Server Database with existing Tables i.e. Database First Approach.
19 Nov 2020 19 Nov 2020 0 Comments  138 Views
Here Mudassar Ahmed Khan has explained a tutorial with example, how to perform Web API CRUD Operations using Entity Framework in ASP.Net MVC Razor.

The Web API will contain Action methods for performing the CRUD operations i.e. Create (Insert), Read (Select), Update and Delete and the CRUD operations will be performed in SQL Server Database using Entity Framework in ASP.Net MVC Razor.
18 Nov 2020 18 Nov 2020 0 Comments  162 Views
Here Mudassar Ahmed Khan has explained with an example, how to send AntiForgeryToken with AJAX requests in ASP.Net Core Razor Pages.

The AntiForgeryToken is used to prevent cross-site request forgery (CSRF) attacks and this article will illustrate how to configure and use the AntiForgeryToken during jQuery AJAX POST call in ASP.Net Core Razor Pages.
18 Nov 2020 18 Nov 2020 0 Comments  126 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  138 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  119 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  123 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  147 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.
17 Nov 2020 17 Nov 2020 0 Comments  153 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform looping through Model properties in View using FOR EACH loop in ASP.Net MVC Razor.

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

Finally 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 MVC Razor.