c# - Viewbag.title like "String Title"+@model.name is it possible? -
i want make page title "index-'categoryname'".i tried use codes this:
@model pagedlist.ipagedlist<article> @using pagedlist.mvc; @using pagedlist; @{ viewbag.title = "index"+@model.category.name; } but didn't work. how can make page title "index-c#" ?? should use?
you should reference model model, not @model. @ character used in order start writing code when in middle of html markup, in case inside code block (started @{ in previous line).
Comments
Post a Comment