I want create menu item in asp.net MVC just as like as home and about us.I tried adding following code in "Site.Master" page.
When you create a strongly typed view, the controller action rendering this view needs to pass a model:
public class HomeController: Controller
{
public ActionResult Patner()
{
var model = new SomeModelTheViewIsStronglyTypedTo();
return View(model);
}
}
And in ~/Views/Home/Partner.aspx
:
<%@ Page
Language="C#"
Inherits="System.Web.Mvc.ViewPage<Some.SomeModelTheViewIsStronglyTypedTo>"
%>
精彩评论