Reputation: 553
I am developing a MVC application in C# and and have a question about displaying text in a view.
I have the following code that does work:
@Html.EditorFor(model => model.Book.Name)
Here is the code that I have written that does not work:
Book Name: @Html.DisplayText(model => model.Book.Name)
May I have some help to get the correct syntax for the above code? I am wanting to display the contents of the model.Book.Name as simple text.
Upvotes: 0
Views: 638