I am trying to add ASP.
NET MVC features(Especially Routing) to my already existing ASP.
NET Web application.I added a Controlled and View (an asp.
net page) .Now i want to know how can i display the details of object of my custom class( Ex : User) in the view ? Can assign the object in ViewData collection and render it in the view ? Hows that ? I already have a Datalayer (in ADO.NET) which is running for the the current ASP.
NET web app.So i want to use that.
I tried this in my controller
public ActionResult Index()
{
BusinessObject.User objUser = new BusinessObject.User();
objUser.EmailId = "
[email protected]";
objUser.ProfileTitle = "Web developer with 6 yrs expereince";
ViewData["objUser"] = objUser;
ViewData["Message"] = "This is ASP.
NET MVC!";
return View();
}
How can i use this in the view page to display the user details ?
Thanks in advance