3
votes

am confused right now with Razor ViewEngine for ASP.NET MVC.

most of you would say:

View.Title

is the same with

ViewData["Title"]

after running the application I get this

Compiler Error Message: CS0103: The name 'View' does not exist in the current context

what gives? did I miss something? am using VWD 2010 Express + ASP.NET MVC 3 R2

1

1 Answers

10
votes

It's been changed to ViewBag in the latest RC.

ViewBag.Title = "Test";

See ScottGu's post on breaking changes in the latest MVC 3 release candidate.