WebTab can populate tab content from code behind.
This topic will show you how to populate tab content programmatically in server-side,
To populate tab content programmatically in server-side
- Drag WebTab control to the WebForm.
- Place the following code in Page_load in order to populate tab content.
C#
Copy Codeprotected void Page_Load(object sender, EventArgs e) { String strContent = "<div class='text'>This window is using InlineContent mode created from code behind.</div>"; WebTab1.TabPages[1].PageTemplate = new GenericContainerTemplate(strContent); WebTab1.TabPages[2].ContentURL = "HTMLpage.htm"; WebTab1.TabPages[2].ContentMode = ContentMode.UseIFrame; }
- Run the project.