+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Is ViewBag implemented in Sitefinity MVC?

Is ViewBag implemented in Sitefinity MVC?

2 posts, 0 answered
  1. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    Registered:
    13 Aug 2010
    18 Jul 2012
    Link to this post
    On this page of the documentation regarding MVC widgets, the demo uses the "ViewData" object to set properties. Generally in Microsoft's MVC 3 documentation, they commonly use "ViewBag" rather than ViewData.

    My question: Is ViewBag ALSO implemented in Sitefinity 5.1, or should we always use ViewData?
  2. Bobby
    Bobby avatar
    8 posts
    Registered:
    04 Feb 2012
    04 Aug 2012
    Link to this post
    Hi Dan,

    I was able to use the ViewBag and it worked properly in my test project.

    Bobby
2 posts, 0 answered