Test Environment VS2005
Tabiner iner control of AjaxControlToolkit, which must be placed on the html of the page
<AjaxAsp: ScriptManager ID = "ScriptManager1" runat = "server">
</AjaxAsp: ScriptManager>
The background code is:
AjaxControlToolkit. TabPanel ta = new AjaxControlToolkit. TabPanel ();
Ta. HeaderText = "hello ";
Ta. ID = "1 ";
Ta. TabIndex = 0;
Label lb = new Label ();
Lb. Text = "your specific content ";
Ta. Controls. Add (lb );
AjaxControlToolkit. TabPanel tb = new AjaxControlToolkit. TabPanel ();
Tb. HeaderText = "hello ";
Tb. ID = "2 ";
Tb. TabIndex = 1;
Label lb1 = new Label ();
Lb1.Text = "what are you doing ";
Tb. Controls. Add (lb1 );
AjaxControlToolkit. TabContainer tab = new AjaxControlToolkit. TabContainer ();
Tab. Tabs. Add (ta );
Tab. Tabs. Add (tb );
This. pn. Controls. Add (tab );
Pn a Panel control adds TabContainner to the panel control, and dynamically adds TabContainer and TabPanel to the Panel.
The ContentTemplate of TabPanel is a content template. You can dynamically add controls to display specific content.
Read data from the database and display it on the TabPanel. Just like in the above example, you can change the data ......
The effect is as follows. I personally tested it.
Write by: suhanyu Date: 2008-11-18