One of ASP. Net 4.0 Web forms Seo improvement measures is to add two new attributes in the page class: metakeywords and metadegion, which enableCodeYou can use programming methods to set these values more easily and cleanly.
The keyword and description settings of meta tags can improve the page relevance of selected keywords, which is conducive to engine search optimization.
For example:
<Head runat = "server">
<Title> ASP. NET 4.0 tutorial </title>
<Meta name = "keywords" content = "ASP. NET 4.0, ASP. NET 4.0 tutorial"/>
<Meta name = "Description" content = "this webpage is an ASP. NET 4.0 tutorial"/>
</Head>
The
The following is a simple code snippet that demonstrates how to set these attributes programmatically in the page_load () event handler function:
Void page_load (Object sender, eventargs E)
{
Page. Title = "ASP. NET 4.0 tutorial ";
Page. metadescription = "the content of this webpage is an ASP. NET 4.0 tutorial ";
Page. metakeywords = "ASP. NET 4.0, ASP. NET 4.0 tutorial ";
}
In addition to setting the keywords and description attributes in the background code, you can also go to the @ page at the top of the. ASPX page.
Set them in Declaration. The following code snippet demonstrates how to do this:
<% @ Page title = "ASP. NET 4.0 tutorial"
KEYWORDS = "ASP. NET 4.0, ASP. NET 4.0 tutorial"
Description = "this webpage is an ASP. NET 4.0 tutorial"
......
%>