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

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -