Maintain Selected (Active) Bootstrap Tab on PostBack in ASP.Net

Last Reply 4 months ago By pandeyism

Posted 4 months ago

I want to active selected tab after post back of each table panel.

<ul class="nav nav-tabs" role="tablist">
  <li class="nav-item">
    <a class="nav-link  active" href="#profile" role="tab" data-toggle="tab" aria-selected="true">profile</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#buzz" role="tab" data-toggle="tab">buzz</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#references" role="tab" data-toggle="tab">references</a>
  </li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
  <div role="tabpanel" class="tab-pane active" id="profile"><asp:Button ID="SaveProfile" runat="server" Text="SaveProfile" CssClass="btn btn-primary" /></div>
  <div role="tabpanel" class="tab-pane fade" id="buzz"><asp:Button ID="SaveBuzz" runat="server" Text="SaveBuzz" CssClass="btn btn-primary" /></div>
  <div role="tabpanel" class="tab-pane fade" id="references"><asp:Button ID="SaveReference" runat="server" Text="SaveReferences" CssClass="btn btn-primary" /></div>
</div>