Search code examples
.net-4.0meta-tagsmaster-pagescontent-pages

meta tags in .net framework 4.0 in pages base on master and content pages


where should i put meta tags in .net framework 4.0 in pages base on master and content pages?

mean in two below purposes :

1 - for each content page separately

2 - for all pages in master page

is there any property in master or content pages for setting meta tags and title ?(i could n't find them)


Solution

  • If there are meta tags that should be on ALL pages, you put it in the <head> section of your master page, just like you would a normal HTML page. There's no property for it because it's not a server-side property, you just put it in your page.

    For individual meta tags that are different for each content page, add a new <ContentPlaceHolder> in the <head> of your master page. That will let you define the actual content on each page.