ASP.NET MVC Razor Title concatenation
I want to concatenate UserName in Title with string. Please fix the below code. Like bel开发者_StackOverflow中文版ow.
@{View.Title = "Delete Confirmation:";} @Html.DisplayFor(model => model.UserName)
I am going to take a wild guess here and go with:
@{View.Title = "Delete Confirmation:" + Model.UserName;}
@{
View.Title = "Delete Confirmation: " + Model.UserName;
}
精彩评论