asp.net - How do I get <%= Html.Encode(item.name) %> in the title and head of page elements -


how <%= html.encode(item.name) %> in title , head of page elements

i wanting use content place holder - title content, , main content. each time try add these in elements error saying not allowed.

<h2>performances :<%= html.encode(item.venue) %></h2> 

this have been doing wont work

can please query, thanks.

remove runat="server" attribute <head> tag. it's legacy left ol' days of webforms has no viable meaning in mvc forgot remove default template.

also if item variable not available in masterpage use content placeholder redefined in each view if variable part of view model available in views.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -