How to specify a model for the razor view in asp.net mvc?
To specify a model for the View, we can using @model statement at the top of the View page.
@model MVCTraining5.Models.PersonalDetail
Now, in the following code the PersonalDetail class properties can be accessed using @Model word like
@Model.FirstName
No comments:
Post a Comment