@{ ViewBag.Title = "Title"; ViewBag.Description = "Test"; ViewBag.Keywords = "Test1,Test2,Test3"; }
如何将元标签放在MVC 3 Razor Engine中?
@if(ViewBag.Description!=null) { <Meta name="description" content="@ViewBag.Description" /> } @if(ViewBag.Keywords!=null) { <Meta name="keywords" content="@ViewBag.Keywords" /> }