One of the SEO improvements for the ASP. 4.0 Web forms is to add 2 new properties to the page class: Metakeywords and Metadescription, which make it easy and cleaner to set these values programmatically in the background code class.
Meta tag keywords, page description settings can improve the choice of keywords page relevance, conducive to engine search optimization work.
For example:
<title>asp.net 4.0 Tutorials </title>
<meta name= "keywords" content= "ASP. 4.0 Tutorial" 4.0,asp.net
<meta name= "description" content= "This page content is an ASP. NET 4.0 Tutorial"/>
The
The following is a simple code snippet that demonstrates how to set these properties programmatically in the Page_Load () event handler function:
void Page_Load (Object Sender,eventargs e)
{
Page. title= "ASP. NET 4.0 Tutorial";
Page. metadescription= "This page content is the ASP. NET 4.0 Tutorial";
Page. metakeywords= "ASP. 4.0,asp.net 4.0 Tutorial";
}
In addition to setting the keywords and description properties in the background code programmatically, you can now also @page at the top of the. aspx Web page
Directives to set them in a declarative manner. The following code snippet demonstrates how to do this:
<%@ page title= "ASP 4.0 Tutorial"
keywords= "ASP. 4.0,asp.net 4.0 Tutorial"
description= "This page content is an ASP. NET 4.0 Tutorial"
......
%>