Read Write ViewBag from Workflow

As an ASP.NET MVC Developer
I want to read/write data in the ViewBag from within a Workflow
So that I can use that data in my MVC page code

Issue: Read Write ViewBag from Workflow

Spike

  • Can you use ViewBag in a workflow expression?

Design Notes

Produce a sample that shows an ASP.NET MVC3 application which sets a value in the ViewBag from a page, invokes a workflow which updates that value and displays the updated value in a page.

Results

VB does not support C# dynamic objects. In fact, in the VB.NET version of MVC instead of using ViewBag they use a Dictionary called ViewData instead.
To pass the ViewData into a Workflow, create an in argument of type ViewDataDictionary and then pass ViewData

Source

Using Workflow with ASP.NET MVC 4

Last edited Apr 11, 2012 at 7:11 PM by ronjacobs, version 7

Comments

No comments yet.