简体   繁体   中英

Can't find tabcontrol control in Visual studio 2019

I am not able to see tabcontrol control in visual studio (2012 and 2019) toolbox. Could anyone tell me is Microsoft people removed it or is there anything I need to do to get it.

Thanks in advance:)

Hum, gee, there never was a web based tab control out of the box.

The often used was say a menu and some kind of view group.

However, there was also the popular ajaxtoolkit and it has a lot of really nice add ins. Its free, and has a bunch of nice features. Particular the file up load control, a pop dialog, a accordion control, and of course a tab control.

And they are all asp.net aware.

Just dragging a tab control from the ajax options (you have to do a nuget for the ajax tool kit), then I get this markup, and then this:

        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"
             BorderStyle="Solid" >

            <ajaxToolkit:TabPanel runat="server" HeaderText="My First Tab" ID="TabPanel1">
            </ajaxToolkit:TabPanel>
            <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="My Second Tab">
            </ajaxToolkit:TabPanel>

        </ajaxToolkit:TabContainer>

and that gets you this:

在此处输入图像描述

However, the ajaox tool kit is QUITE a large library to adopt JUST for a tab control.

since everyone has jquery, then I would introduce jQuery.UI, and say adopt their tab control - and it bootstrap friendly + styled anyway (the ajaxtoolkit is really nice but it needs a bit of love and care when it comes to look and feel).

The jQuery tab control looks like this:

在此处输入图像描述

So, these days, I would give consideration to jQuery.UI. While the controls in the ajaxtoolkit tend to be "easier" to use out of the box, once you make a bit more effort to adopt jquery.UI, then it is a one time effort, and then re-use and needing of more tab controls will not be really much different work wise.

You can find the jQuery.UI here:

jQuery.UI tab example and page

And the ajax toolkit (now maintained by dev express)? Use nuget. The ajaxtoolkit is open source - free to use

official page here: Dev Express main page

Working tab control sample here

Ajaxtoolkit tab sample

As noted, You can use a multi-view, a view, and a menu if you wanted to build your own, but I can't recall tht asp.net had a tab control out of the box for asp.net (web based).

Of course for desktop, we always had a tab control, but not for web.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM