Skip to content
Loading
Crud Form with Modal Popup        
  •                 
  •             
  •         
  •         
  • "text/javascript">      
  • function ShowPopup(title) {      
  • $("#MyPopup .modal-title").html(title);      
  •   
  • $("#MyPopup").modal("show");      
  • }      
  •       
  •   
  •   
  • protected void AddEmployees(object sender, EventArgs e)      
  • {      
  •     string title = "Greetings";      
  •     string body = "Please Add Employee";      
  •     ClientScript.RegisterStartupScript(this.GetType(), "Popup""ShowPopup('" + title + "');"true);      
  • }    
  • step 2. On Click of Add Employees open the popup from code behind as
     
    1. protected void AddEmployees(object sender, EventArgs e)    
    2. {    
    3.     string title = "Greetings";    
    4.     string body = "Please Add Employee";    
    5.     ClientScript.RegisterStartupScript(this.GetType(), "Popup""ShowPopup('" + title + "');"true);    
    6. }    
  • Asma Khalid
    Understamd Page Loading with Data on Modal concept and I am sure you will be able to create CRUD operations in such manner i.e. https://bit.ly/2Ze0FUe. You can also checkout MVC Event Manager example in such manner i.e. https://bit.ly/2AEl7UZ
     
    Mark answer as accepted if helpful
     
    Thanks & Regards,
    Asma Khalid
     
    For More Visit: www.asmak9.com or www.bytezaar.com
     
  • Arnab Mukherjee
     Hi, you can download the complete CRUD with Modal Popup source code from the below repo.
     
    https://github.com/ArnabMSDN/ASP.NET-Core-Sample
  • Piyush Pansuriya
    Hello,
    Please go through the below links

    https://www.youtube.com/watch?v=FdnelZ7BxPo
     
    https://www.c-sharpcorner.com/article/crud-operation-in-asp-net-mvc-using-ajax-and-bootstrap/