Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tabs in aspx page

Tags:

asp.net

I need to put two tabs on my aspx page (c#). Is there already done tabs control for aspx ?

like image 422
Rebecca Avatar asked Oct 28 '10 16:10

Rebecca


2 Answers

Ajax has tabs you can use:

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/tabs/tabs.aspx

jQuery also has tabs you could use, which in my opinion is the better choice:

http://jqueryui.com/demos/tabs/

In strictly ASP.NET you can use multiview, and make tabs, here is a tutorial for that:

http://www.codeproject.com/KB/custom-controls/TabControl.aspx

like image 122
Jacob Nelson Avatar answered Oct 19 '22 23:10

Jacob Nelson


Bootstrap is commonly used with aspx so I used it on my webpage for tabs. This is a tutorial page.

Please find below an example for two tabs:

<div id="Tabs" role="tabpanel">
<!-- Nav tabs -->
 <ul class="nav nav-tabs" role="tablist">
   <li class="active"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings tab</a></li>
   <li><a href="#info" aria-controls="info" role="tab" data-toggle="tab">Information tab</a></li>
 </ul>
<!-- Tab panes -->
 <div class="tab-content">
   <div role="tabpanel" class="tab-pane active" id="settings">
   </div>
   <div role="tabpanel" class="tab-pane" id="info">
   </div>
 </div>
</div>

You need to have bootstrap.css and bootstrap.js references in page head section.

like image 43
Luca Avatar answered Oct 20 '22 01:10

Luca