MVC newbie question:
I\'m picking up a URL of the form go/{mainnav}/{subnav}, which I\'ve successfully routed to the GoController class, me
i'm using following approach:
ViewModel.class:
public class TitleBodyModel
{
public string Title { get; set; }
public string Body { get; set; }
public TitleBodyModel() { Title = Body = ""; }
public TitleBodyModel(string t, string b) { this.Title = t; this.Body = b; }
}
In the main View:
@Html.Partial("_TitleBody" , new XXX.Models.TitleBodyModel("title", "body" ))
Then in a partial view:
@model XXX.Models.TitleBodyModel
@Model.Title
@Model.Body