Posts

Showing posts with the label ASP.NET Core MVC 5.0

Donate

Add Dropdown Or Select Control With OnchangeEvent To Bootstrap-Table Wenzhixin In ASP.NET Core MVC

Image
Hello and Good day! In this blog post I will demonstrate on how to add a select or dropdown control in Bootstrap-Table by Wenzhixin with an OnChange() event in ASP.NET Core MVC. For this tutorial, I will only fetch records from a List variable with fake information and not from a database for simplicity sake. To begin create an ASP.NET Core MVC using Visual Studio that targets the .NET 5 Framework and perform the rest of the steps below. I. Project Setup A. Add via libman the Bootstrap-Table by Wenzhixin using CDN as the option. B. Add via libman font-awesome using CDN as the option. C. Add the latest tableExport.js to bootstrap-table folder. D. Add Nuget Package Microsoft.AspNetCore.Mvc.NewtonsoftJson 5.x E. Add a new class in the Models folder called Product.cs Here's the project structure. II. Coding The Project A. Product.cs - Add properties that describe a product. The status property is where the Dropdown of the Boostrap-Table is bound to. public class Product {

Install And Integrate Tailwind CSS 3.0 In ASP.NET Core MVC 5.0 Web Application

Image
Hi Felas! In this post, I will now demonstrate on how to integrate Tailwind CSS into an empty ASP.NET Core 5.0 MVC Web Application and the steps used where taken from my previous post on How To Install Tailwind CSS 3.0 Using Tailwind CLI And Visual Studio Code In Your Web Project Project Setup 1. Create a new ASP.NET Core MVC project using Visual Studio 2019. 2. Once created, add two empty css files called input.css and output.css inside the css subfolder of wwwroot. 3. In your _Layout.cshtml page, comment out or remove the code that references both the bootstrap.min.css and site.css files. 4. Replace that with output.css. For now this is just an empty stylesheet file and after the CLI build is done, this file will be populated with Tailwind css codes. Installing Tailwind CSS using CLI command 1. Open Package Manager Console in Visual Studio 2019 (Tools -> NuGet Package Manager -> Package Manager Console). 2. Run create package.json command. This will eventually ad

Getting Started With Bootstrap-Table In An ASP.NET Core MVC 5 Web Application With Entity Framework Core And SQL Server

Image
Hello, In this tutorial, I will demonstrate on how to integrate Bootstrap-Table created by Wenzhixin in an ASP.NET Core MVC 5 with Entity Framework Core and SQL Server. For this post, I'll be using Microsoft's free database called ContosoRetailDW. Most of the ASP.NET MVC 5 web project in our company use this widget for showing records to clients because this has tons of features like exporting, paging, searching, sorting by column names and a whole lot more and this awesome widget has been constantly improved by the product owner and some dedicated developers. Project Setup 1. Lets start by creating an ASP.NET Core MVC application targeting the latest framework which is .NET 5 using Visual Studio 2019. 2. Add these NuGet packages for Entity Framework Core and ASP.NET Core MVC Newtonsoft.Json 3. Next is to reverse engineer the ContosoRetailDW so that we can use it's tables. The bootstrap-table widget will load records from DimPromotions table. Scaffold-DbContext "

Getting Started With ASP.NET Core 5.0 MVC Web Application Using Dapper ORM And SQL Server

Image
Hi All, In this tutorial, I will demonstrate on how to create an ASP.NET Core 5.0 MVC CRUD Web Application using Dapper ORM which is considered as the King of Micro ORM and an alternative to both Entity Framework and RepoDB ORM. I have published ASP.NET MVC and ASP.NET Webforms articles before using Dapper ORM in this blog and have used this ORM in an internal application before. With the birth of .NET Core framework, it's time to join the bandwagon of promoting these type of tools that helped maximize the productivity of the developers by creating articles as guide or reference. Enough with the chitchat and lets start coding. :-) I. Project Setup 1. Create a Customer table in a SQL Server database using the script below. USE [Your_Database] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Customer]( [CustomerID] [numeric](18, 0) IDENTITY (1,1) NOT NULL , [CompanyName] [varchar](40) NULL , [Address] [varchar](35)

Donate