ViewBag and ViewData are mechanisms in ASP.NET MVC for passing data from controllers to views. ViewBag is a dynamic property that allows setting and accessing data, while ViewData is a dictionary-like container.
ViewBag.Name = "Yogesh";
ViewData["Name"] = "yogesh";