More in this section

Forums / Developing with Sitefinity / MVC and clean HTML

MVC and clean HTML

3 posts, 1 answered
  1. Erik
    Erik avatar
    10 posts
    Registered:
    31 Jul 2012
    19 Aug 2012
    Link to this post
    Hi all,

    I'm playing with MVC in Sitefinity 5.1 and I'm confused.
    If I add an MVC 'widget' to a new (and only) page in a test project, the generated HTML still contains all the webforms viewstate garbage. A simple hello world page ends up with 150+ lines of unnecessary rubbish.
    Did I maybe miss a setting that transforms your project to MVC only?

    Gr. Erik
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    19 Aug 2012
    Link to this post
    The widget should be pure MVC goodness, but the template needs to have been created in Pure MVC mode.

    Try creating a new template, and there's an advanced area where it'll give you 3 radio buttons to pick the render mode.

    Steve
    Answered
  3. Erik
    Erik avatar
    10 posts
    Registered:
    31 Jul 2012
    20 Aug 2012
    Link to this post
    That did the trick.
    Thanks!
3 posts, 1 answered