Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to render a web-part inside of a control?

I have a webpart with a certain functionality which I want to re-use on a different page-layout directly. The first idea would be to extract the functionality into a control and then make the web-part display this control (loads of articles on the internet on how to do this...)

But: Is it possible to do it the other way around? I.E. have a control which embeds a web-part?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

A web part is just a control, so anything you can do with a control you can do with a web part.

If you need the chrome(Title, border, etc) for a ASP.NET Web part then you need to add that yourself.

share|improve this answer
    
You're right. Simply adding the web-parts to the child-controls is fine. I had a different error leading to "empty rendering". Thanks. –  Nils Apr 19 '12 at 8:42
add comment

Your Answer

 
discard

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.