Member-only story
.Net Core MVC Bootstrap Modal Using with JQuery
4 min readNov 29, 2024
Hello guys,
In this article, I will be talking about using bootstrap modal.
I will answer the question of how I can use the bootstrap model with jquery.
1- I created .Net MVC Core with default template project.
2- I created new class: Models > PersonModel.cs
namespace ModalWithJquery.Models
{
public class PersonModel
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
}
3- I added CreateModal(GET and POST) method to HomeController
using Microsoft.AspNetCore.Mvc;
using ModalWithJquery.Models;
using System.Diagnostics;
namespace ModalWithJquery.Controllers
{
public class HomeController : Controller
{…