I am trying to implement Bootstrap Confirmation (http://ethaizone.github.io/Bootstrap-Confirmation/#top) on an asp.net web page (C#) but I'm running into issues.
Master Page Refs
<asp:ScriptReference Path="Scripts/jquery-1.11.2.js" />
<asp:ScriptReference Path="Scripts/bootstrap.js" />
<asp:ScriptReference Path="Scripts/bootstrap-datepicker.js" />
<asp:ScriptReference Path="Scripts/jquery.validate.min.js"/>
<asp:ScriptReference Path="Scripts/bootstrap-confirmation.js"/>
Button
<asp:Button ID="btnCancel" data-toggle="confirmation-singleton" data-placement="left" CssClass="btn btn-danger" runat="server" Text="Cancel" OnClick="btnCancel_Click" />
jQuery
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="confirmation-singleton"]').confirmation('show');
Code behind button
protected void btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("blabla.aspx");
}
When I click on button I get redirected to page , no confirmation box :-(
Checked the console on Chrome and no errors. When I run the jQuery from console I get
<input type="submit" name="ctl00$ContentSection$btnCancel" value="Cancel" id="ctl00_ContentSection_btnCancel" class="btn btn-danger" data-toggle="confirmation-singleton" data-placement="left" data-original-title="" title="">
Any ideas ? Thanks in advance for your help