SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create multiple tabs within a webpart using "Multiview". There are lot of examples available for creating tabs using "Multiview" or "TabControl" but that were in pages.

So I would like to do the same in webpart, so please suggest how to achieve that functionality.

I have tried the following, it executed but nothing can be viewed inside the web part.

protected override void CreateChildControls()
  Label lblname = new Label();

  lblname.Text = "testlabel";

  MultiView multiMain = new MultiView();

  View view1 = new View();




Chandra Shekhar

share|improve this question

First thing in the above code i observed. You are not adding the controls to Controls collection


Then only the webpart can render your controls

share|improve this answer
Hello, Thanks for your reply. So you mean to say that I need to add "this.Controls.Add(multiMain);" at the end? Please suggest – Chandra Shekhar Aug 4 '11 at 6:07
Yes, that will do. – Anita Boerboom Aug 4 '11 at 16:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.