More in this section

Forums / Developing with Sitefinity / Programmatically create instance of DynamicContentView

Programmatically create instance of DynamicContentView

5 posts, 1 answered
  1. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    12 Apr 2012
    Link to this post
    So I am trying to programattically render a widget from a custom module on a page. I can do this easily with News by doing the following:

    var control = new NewsView() { DetailItem = item };
    page.Controlls.Add(control);

    How would I do this for a custom module? It seems that the view object is DynamicContentView. What all would I need to set on it to create an instance of one and have it render?
  2. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    13 Apr 2012
    Link to this post
    Anyone out there?
  3. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    16 Apr 2012
    Link to this post
    Still looking for an answer...
  4. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    17 Apr 2012
    Link to this post
    Erik, I was about to post suggesting that perhaps the solution might apply here as well, thank you for taking the time to update the thread!
    Answered
5 posts, 1 answered