This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
We’ve just been defining our data directly in the view. Typically, it’s the controller’s job to supply data to the view. Let’s move our data from our view to the controller.
Follow Along
To follow along commiting your changes to this course, you'll need to fork the aspnet-comic-book-gallery repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd aspnet-comic-book-gallery
git checkout tags/v3.4 -b setting-data-in-the-controller
Additional Learning
For more information on using dynamic types in C#, see this MSDN page.
Keyboard Shortcuts
-
CTRL+C
- Copy to clipboard -
CTRL+X
- Cut to clipboard -
CTRL+V
- Paste from clipboard
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up