ViewData is always null I simply used ViewBag.Greeting instead of ViewData["Greeting"] and it worked fine