Right so. I created a new project in Visual Studio of type Internet Application.
In the HomeController.vb file I have:
Function Index() as ActionResult
ViewData("Message") = "Page Title"
Return View()
End Function
and in the view ‘Index.aspx’ I need that view data to be displayed between the ‘ < h1 > ‘ tags that I have.
I have looked around and found people saying to type:
<%= ViewData["Message"] %>
or
<% @ViewData["Message"] %>
but none of these are working 🙁
You might be using the wrong bracket? Should it not be?
<%= ViewData("Message") %>EDIT: here is a VB.Net tutorial: http://www.asp.net/mvc/tutorials/older-versions/views/asp-net-mvc-views-overview-vb
See heading
Using View Data to Pass Data to a View