Add SimpleView to Page programmatically
Hello there!
I just want to know, if there's a way to add a SimpleView-Control to a Page programmatically?
I've used the Testimonials Intra-Site Module Sample as base for a own module. Since it is easier to install, I want to use SimpleView for the Backend-Page-Controls, instead of ascx an code-behind. It is possible to add the SimpleView as PageControl programmatically to the Backend-Page and how?
Thanks in advance, Dieter
var control =
new
NewsView();
var pageControl = pageManager.CreateControl<PageControl>(control, placeHolder);
page.Page.Controls.Add(pageControl);
pageManager.SaveChanges();
Thank You, SelAromDoteNet! I made a mistake in my code, now it works with Your help!