I am working on MVC 5 application. In that I need to display the name of the application in every page, that name is coming from database. one of the view display correctly but its not working in other views.
I am using like this
@Html.DisplayFor(model => model.app_name, new { name = ViewData["Appname"] })
this is working only in one view, not all other views.
the table columns are not display as expected after this model => model.
how to display the name of the application in all views
Thanks,
Display name in MVC view
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Jan 30, 2015, 4:50 PM EST
keyurRank #5,481 · 298 reputationPosted Feb 9, 2015, 7:26 PM EST
In MVC we have _Layout.cshtml file which work as master page in asp.net.So add _Layout file in shared folder and put there your common things to show in all views.
Like in asp.net we have contentplaceholder here we have RendarBody.
So use _Layout file and include in your view.
http://www.w3schools.com/aspnet/mvc_layout.asp
this will help you,