Create a Webtab Programically

1 reply. Last post: August 31, 2015 3:29 AM by John Steel
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Jim DresserMember

In my application, I want to create WebTabs dynamically.

The .aspx page looks like this:
<ISWebDesktop:WebTab ID="WebTab2" runat="server" Height="300px" Width="500px">
</ISWebDesktop:WebTab>

And in Page_Load(), I've got the following:
WebTabItem myTabItem = new WebTabItem();
myTabItem.Name = "Jim";
myTabItem.Text = "Jim";
myTabItem.ContentMode = ContentMode.UseInlineContent;

String strContent = "<div class='text'>This window is using InlineContent mode created from code behind.</div>";
myTabItem.PageTemplate = new GenericContainerTemplate(strContent);
myTabItem.ToolTip = "Newly added TabItem";
WebTab2.TabPages.Add(myTabItem);


This will create the tab, but the PageTemplate data is not created.  The div, and the text "This window is using...." is not displayed.

Can you help, what am I doing wrong?
Thanks,
Jim


All times are GMT -5. The time now is 4:57 PM.
Previous Next