Link to home
Start Free TrialLog in
Avatar of mgmhicks
mgmhicks

asked on

Calling bootstrap modal window from asp.net

when I submit a form, I need to validate one of the fields and if all is good I would like to load a bootstrap modal verifing that they are sure.  That form has a cancel and submit button.   If they submit I want to run code behind to post the transaction, or cancel will close the confrim modal and leave them where they are.  Question is I am using the following script and I cant get the modal window to show.   Here is the code behind I am using and the code of the dummy modal window I am trying to get to work.

 Dim myPayment As New CheckPaymentService
        Dim mBankName As String = String.Empty
        If myPayment.CheckRouteNo(Trim(txtRouteNo.Text), mBankName) Then
            ClientScript.RegisterClientScriptBlock(Me.GetType(), "ClientScript", "$('#MainContent.basicModal1').modal('show'); ")
            ' continue with processing
        Else
            CheckBox1.Checked = False
            ClientScript.RegisterClientScriptBlock(Me.GetType(), "ClientScript", "bootbox.alert ('Invalid Route Number') ", True)
        End If

Open in new window


<div class="modal fade" id="basicModal1" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="false">Close</button>
                    <h4 class="modal-title" id="myModalLabel">Terms and Conditions</h4>

                </div>
                <div class="modal-body">
                    <h3>I hereby authorize MGM Enterprises, Inc., dba The Apartment Gallery,  dba Waterford Associates, to debit my bank account through the electronic 

Automated Clearing House (ACH) network within one to three business days from the date of this payment. I am aware that in the event The Apartment Gallery  is unable 

to secure funds from my bank account for this transaction for any reason, including but not limited to, insufficient funds in my account or insufficient or 

inaccurate information I provided when I submitted the electronic payment, further collection action may be undertaken by The Apartment Gallery, including 

application of returned check fees to the extent permitted by law.  If the payment is returned by my bank, I am still responsible for making a payment on my The 

Apartment Gallery or Waterford Associates account.</h3>
                </div>

            </div>
        </div>
    </div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial