I have a button that opens a bootstrap popover. This is the markup.
<HeaderStyle Width="6%"></HeaderStyle>
<ItemTemplate>
<asp:LinkButton runat="server" ID="button1" data-toggle="popover" CssClass="btn btn-primary" Text="Button1" />
</ItemTemplate>
Javascript:
$('[data-toggle="popover"]').popover({
placement: 'left',
trigger: 'click',
html: true,
content: $('#testDiv')
});
The aim is to display the bootstrap popover from the code behind/ server side code. This is what I tried from the code behind which did not work.
C#
ScriptManager.RegisterStartupScript(this, GetType(), "popoverscript", "$('#testDiv').popover('show'); ", true);
Any suggestion is much appreciated.