0

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?

1

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.

  • 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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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