C Sharper
C Sharper

Reputation: 8626

Dynamically add tabpanel to tabcontrol

I wanted to dynamically add tab panel to tabcontainer

I have written the code.

I has no errors, but still its not showing me tabs.

My code:

ds = gc.GetDataToListBinder("select distinct(tabname) from Parameteronline where isactive='Y'")



            For i = 0 To ds.Tables(0).Rows.Count - 1

                Dim tpParameter As AjaxControlToolkit.TabPanel = New AjaxControlToolkit.TabPanel()

                tpParameter.ID = "Panel_" & ds.Tables(0).Rows(i)(0).ToString()
                tpParameter.HeaderText = ds.Tables(0).Rows(i)(0).ToString()

                Dim tc As AjaxControlToolkit.TabContainer = New AjaxControlToolkit.TabContainer()

                tc.Tabs.Add(tpParameter)

            Next

ds is dataset here. I am getting tab panel's header text from this dataset.

Code has no errors. But still its not showing me result (tabcontainer)

Please help me.

Upvotes: 0

Views: 1099

Answers (1)

OneFineDay
OneFineDay

Reputation: 9024

There must be a container for the control to be placed. MSDN

Upvotes: 1

Related Questions