2010-12-04 95 views
0

我想連接標題中的UserName和字符串。請修正下面的代碼。如下所示。ASP.NET MVC Razor標題串聯

@{View.Title = "Delete Confirmation:";} @Html.DisplayFor(model => model.UserName) 

回答

3

我要在這裏乘坐胡亂猜測,並去:

@{View.Title = "Delete Confirmation:" + Model.UserName;} 
1
@{ 
    View.Title = "Delete Confirmation: " + Model.UserName; 
}