Getting string message to the view from code behind

Posted by Goud.Kv under ASP.NET MVC category on | Points: 40 | Views : 951
Below code snippet shows you how to transfer and display the string in the view from code behind,

In your controller of your application,

 public ActionResult Index()
ViewBag.Message = "Welcome to Gaming Zone";
return View();

And., Call that string in the view(Index)


Comments or Responses

Login to post response