Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I'm developing an application in asp.net using bootstrap theme. At the login page the button click event is working fine unless I apply bootstrap validation to it. But when I apply bootstrap validation to it, button click event is not firing.

Anyone please try to resolve this issue, I've tried every thing but not able to fix it

Thank,
Imtiyaz

What I have tried:

ASP.NET
<div class="form-group">
                    <div class="col-lg-12">
                        <div class="input-group">
                            <span class="input-group-addon"><i class="fa fa-user fa-fw" style="font-size: 16px;"></i></span>
                            <asp:TextBox ID="txtUsername" runat="server" CssClass="form-control" placeholder="Username" meta:resourcekey="txtUsernameResource1"
                                data-bv-notempty="true"
                                data-bv-notempty-message="Username is required and cannot be empty."></asp:TextBox>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-12">
                        <div class="input-group">
                            <span class="input-group-addon"><i class="fa fa-key fa-fw" style="font-size: 16px;"></i></span>
                            <asp:TextBox ID="txtPassword" runat="server" CssClass="form-control" TextMode="Password" placeholder="Password" meta:resourcekey="txtPasswordResource1"
                                data-bv-notempty="true"
                                data-bv-notempty-message="Password is required and cannot be empty."></asp:TextBox>
                        </div>
                    </div>
                </div>

JavaScript
<script type="text/javascript">
    $(document).ready(function() {
        $('#frmMasterLogin').formValidation({
            framework: 'bootstrap',
            icon: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            }
        });
    });</script>
Posted
Comments
Richard Deeming 26-Jun-17 14:27pm    
mimtiyaz 26-Jun-17 14:57pm    
Yes, but i'm using here the master page
Richard Deeming 26-Jun-17 14:59pm    
The only difference that will make is that the control IDs in the rendered HTML won't necessarily match the IDs in the server-side markup.
mimtiyaz 26-Jun-17 15:01pm    
How to overcome this issue?
Richard Deeming 26-Jun-17 15:02pm    
Start by determining whether that's the issue, or whether it's the same problem as your previous copy of this question.

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