Hey, I am dynamically instantiating web parts on my Kentico page by first getting the web part and then setting the properties in the code and then adding it to the page.This is working well, When I go to my page in the Design tab I can see my web part has been added to the page with all the properties I set in the code.The only problem is that I have to manually select the layout for that web part I created. Is there a way to also set the layout using the layout code name for a specific web part ?For e.g:WebPart.SetValue (@Layout@, @LayoutCodeName@); The same way I set other props on the web part.
Or
WebPart.SetLayout();Any help will be greatly appreciated.Kind RegardsDominic
↧