Friday, December 30, 2022

Bootstrap Modal popup for Error Show or hide - OnAsyncPostBackError ASP.NET C# - Show and hide modal popup javascript

   <!-- Modal -->

          <div class="modal fade" id="myModal" role="dialog">

            <div class="modal-dialog modal-sm">

              <div class="modal-content">

                <div class="modal-header">

                  <button type="button" class="close" data-dismiss="modal">&times;</button>

                  <h4 class="modal-title">Error</h4>

                </div>

                <div class="modal-body">

                  <p>This is a small modal.</p>

                </div>

                <div class="modal-footer">

                  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

                </div>

              </div>

            </div>

          </div>


javascript


$('.modal-body').html('Enter body');

               $('#myModal').modal('show');

//$('#myModal').modal({ show: false});


reference:- https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_modal_lg&stacked=h

No comments:

Post a Comment