문제

What is the simplest way of getting meta description / keywords onto my _Layout page? Something similar to how you get the page Title would be nice. Such as

<title>@ViewBag.Title</title>
<meta name="keywords" content='@ViewBag.Keywords'/>
<meta name="description" content='@ViewBag.Description'/>

My view would look something like:

@{
    ViewBag.Title = "Contact Me";
    ViewBag.Keywords = "My, keyword, list, etc";
}

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top