title: bootstrap popover from code behind
body: <p>In my gridview header, i have user names and what I need is to display user details, in bootstrap popover when user click on the user name. </p>
  
  <p>I tried below just to check if can get the popover to display from code behind but it did not work:</p>
  
  <p>ASPX:
      
          
              <br>
          
      </p>
  
  <pre><code>&lt;a href="#" id="popover"&gt;the popover link&lt;/a&gt;
  &lt;div id="popover-head" class="hide"&gt;
      some title
      &lt;button type="button" class="close" data-dismiss="popover" aria-hidden="true"&gt;×&lt;/button&gt;
  &lt;/div&gt;
  &lt;div id="popover-content" class="hide"&gt;
      &lt;input type="text" id="txtInput" /&gt;
      &lt;button type="button" id="btn" class="clickme" value="Calc" &gt;&lt;/button&gt;    
  &lt;/div&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>Protected Sub I1_Click(sender As Object, e As System.EventArgs) Handles I1.Click
          Dim sb As New System.Text.StringBuilder
          sb.Append("&lt;script type='text/javascript'&gt;")
          sb.Append("$('#popover').popover({")
          sb.Append("html: true,")
          sb.Append("title: function () {")
          sb.Append("return $(""#popover-head"").html();")
          sb.Append("},")
          sb.Append("content: function () {")
          sb.Append("return $(""#popover-content"").html();")
          sb.Append("}});")
          sb.Append("&lt;/script&gt;")
          ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(),
              "popoverscript", sb.ToString(), False)
      End Sub
  </code></pre>
  
  <p>How can I call a popover from the code behind or any alternatives? Help please...</p>
  
  <p>Thanks,
  Navin</p>