We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tab script add tab and remove tab

Thread ID:





117222 Sep 10,2014 10:50 AM UTC Sep 17,2014 05:13 AM UTC ASP.NET Web Forms (Classic) 4
Tags: TabStrip
Asked On September 10, 2014 10:50 AM UTC

Is there any way to add tab or remove tab when click button?

Muralishankar Sundaram [Syncfusion]
Replied On September 11, 2014 12:50 PM UTC

Hi Siang, 

Thank you for using Syncfusion products. 

Yes, By handling the Tabstrip object you can easily add and remove the tab manually. Please refer the following code snippet:



protected void button2_Click(object Sender, Syncfusion.Web.UI.WebControls.Shared.ButtonAdvControl.ButtonAdvClickEventArgs e)





        protected void ButtonAdv1_Click(object Sender, Syncfusion.Web.UI.WebControls.Shared.ButtonAdvControl.ButtonAdvClickEventArgs e)


            tab.Items.Add(new TabStripItem() { Text = "Sample" });



we have attached the sample solution for add and remove tab action. 



Attachment: Tab_add_4918ce7b.zip

Replied On September 12, 2014 07:20 AM UTC

How about if using tab strip with multi page?

Is there any sample?

Replied On September 15, 2014 08:39 AM UTC

Hi, Muralishankar Sundaram

Actually I facing the problem when create new TabStripItem with a PageView.

When I click the button to create the TabStripItem with PageView at the first time, it worked ok.
However when I click the button second time or more, the TabStripItem is create but the PageView is replaced the previous PageView.

No matter how many times I click the button, only the Items in the TapStrip are increasing but the total PageView in the MultiPage keep remain at 1.

Here is my code.
[asp .net]
 <syncfusion:TabStrip ID="TabStripControl1" runat="server" Width="1024px" AutoFormat="Multiple Pages" MultiPageID="MultiPageControl1">
<syncfusion:MultiPage ID="MultiPageControl1" runat="server">


int id = TabStripControl1.Items.Count + 1;

Label newLabel = new Label() { ID = "LabelControl"+id, Text = "Label"+id };

PageView newPageView = new PageView() { ID = "PageViewControl" + id };


TabStripItem newTabStripItem = new TabStripItem() { ID = "TabStripItemControl" + id, PageViewID = "PageViewControl" + id, Text = "Tab"+id};


Muralishankar Sundaram [Syncfusion]
Replied On September 17, 2014 05:13 AM UTC

Hi Siang, 

Sorry about the inconvenience caused. 

We are able to reproduce the reported issue "Multipage is not maintaining the pageview state on the post back" with Tab control. we have logged the reported issue  as defect and working on it. In order to get fix, please contact us at Syncfusion Support or you may also open a support ticket by login in to direct trac account and mention this forum link for reference. 

Kindly let us know if you have further queries.  




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon