Retreive value from model into view ib MVC 3
- by prerna
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
/* public string Browse()
{
return "Hello from Browse";
public string Details(int id)
{
string message = "Store.Details, ID = " + id;
return message;
// return "Hello from Details";
}*/
public ActionResult Details(int id)
{
var album = new Album { Title = "Album " + id };
return View(album);
}
}
I am new to MVC 3 ,My View is Details.aspx without Razor engine.
<html>
<head runat="server">
<title>Details</title>
</head>
<body>
<div>
</div>
</body>
</html>
Can anyone help