Click here to Skip to main content
15,909,605 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i just a button and behind this use
code behind the asp.net and as i try to click on button not tongle popup model show

What I have tried:

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
Posted
Updated 28-Aug-19 2:12am

1 solution

Your Question is not clear, whether you're trying to show the modal popup from Code behind or just as html, if you want to show it from code behind check this answer on stack overflow

Display Bootstrap Modal from Asp.Net Webforms - Stack Overflow[^]

or if you want to show it on page load check this link
Using Bootstrap modal Popup with Webform | The ASP.NET Forums[^]


Also make sure you follow example with bootstrap versions as there have been breaking changes from 3.* to 4.*
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900