Design and CSS styles
Version 7.x > Design and CSS styles > How to add web-part zone to web-part View modes: 
User avatar
Member
Member
pavel.1991-tut - 2/22/2013 2:42:12 AM
   
How to add web-part zone to web-part
I have my web-part(web-partA). I want to add another web-part into web-partA. I tryed to add "<cms:CMSWebPartZone ZoneID="my_web_partZone1" runat="server" />", but it does not work! How to do this?

User avatar
Kentico MVP
Kentico MVP
Brenden Kehren - 2/23/2013 12:26:45 PM
   
RE:How to add web-part zone to web-part
Maybe step back and ask the question, why do you want to nest a webpart inside another webpart? OR even better yet, what are you trying to accomplish? Are you looking to use some features of one webpart inside another? If so, then you're better off referencing the actual control utilized in the webpart.

For instance, I want to create a webpart that looks up details from a custom table, display selections in a dropdown list and based on the selected index, I populate a list of items from another custom table in a repeater.

I'd create my own webpart, place a <cms:CMSRepeater> and a <asp:DropDownList> on the control page. Then in your code behind you publicly expose properties for the end user to set (TransformationName, AlternatingTransformationName, SelectedTransformationName, etc.).