Razor Engine - SEO Meta tags

前端 未结 3 1669
名媛妹妹
名媛妹妹 2020-12-24 14:01

I need to place unique description and keywords meta tags to each page. Tried this. But its not clicking.

@{
    ViewBag.Title = \"Title\";
    ViewBag.Descr         


        
3条回答
  •  执念已碎
    2020-12-24 14:25

    You need to emit tags in your layout page that use the values.
    You can get the values in the tags by writing @ViewBag.Description.

提交回复
热议问题