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 you suggest me a tutorial for MVC3 without razor
As you are not using the Razor view engine (ala MVC 2) you should be able to do it like this…
At top of page…
NOTE:
MyNamespace.Models.Albumneeds to match you Model classthen…
…to be honest, I am assuming what would have worked in MVC2 will be the same in webforms view engine in MVC 3. I have always used Razor for MVC 3… not sure why you would avoid :S