Retreive value from model into view ib MVC 3
Posted
by
prerna
on Stack Overflow
See other posts from Stack Overflow
or by prerna
Published on 2012-03-20T10:15:21Z
Indexed on
2012/03/20
17:29 UTC
Read the original article
Hit count: 303
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
© Stack Overflow or respective owner