Click here to Skip to main content
15,746,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to call bootstrap modalpopup in usercontrol ? (or) How to cal bootstrap modal popup in .aspx page not masterpage in

What I have tried:

How to call bootstrap modalpopup in usercontrol ?
Updated 4-Apr-23 11:08am

1 solution

Consider This being your Modal with some controls being inside of it:
<div id="modal" modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×
                    <h4 class="modal-title">Register Form</h4>
                <div class="modal-body">
                    <asp:Label runat="server"  Text="Enter  UserName"></asp:Label>
                    <asp:TextBox runat="server" class="form-control" ID="txtUserReg">
                    <br />
                    <br />
                    <asp:TextBox runat="server" TextMode="Password" ID="txtPassReg">
                <div class="modal-footer">
                    <asp:Button  ID="btnSave" Text="Save" OnClick="Register_Click" 
                     runat="server" />

You have to Create a button or a control that on click you will Show your modal or on some sort of event..
If you want to make the modal pop up the you have to use some javascript:
    $(document).ready(function () {
        $("#Button1").click(function () {

        $(".showHideModal").click(function () {

I Hope this will help you Out!!
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