Source : ASP.NET TECHBLOG
Today with the increasing need of search engine optimization webmaster or website developer always need to think minimum requirements of SEO and whether the technology the website is developed supports SEO Tags or not.
There were lots of issues with earlier versions of Asp.Net for detecting SEO related tags which made difficult for ASP.net developed website to be SEO friendly.
# ASP.NET 4 SEO Improvements
ASP.NET 4 includes a bunch of new runtime features that can help you to further optimize your site for SEO. Some of these new features include:
Below is a simple code snippet that demonstrates setting these properties programmatically within a Page_Load() event handler:
void Page_Load(object sender, EventArgs e)
{
Page.Title = "Example of setting title Programatically";
Page.MetaDescription = "setting Meta Description";
Page.MetaKeywords = "Asp.Net, Blog, SEO, and other keywords";
}
In addition to setting the Keywords and Description properties programmatically in your code-behind, you can also now declaratively set them within the @Page directive at the top of .aspx pages. The below snippet demonstrates how to-do this:.
<%@ Page Title="Page Title"
Keywords="Keywords"
Description="Description"
MasterPageFile="~/Site.Master"
CodeBehind="Exampleseo.aspx.cs"
Inherits="WebApplication1.Exampleseo" %>
Posted By Internet Marketing Dubai
Today with the increasing need of search engine optimization webmaster or website developer always need to think minimum requirements of SEO and whether the technology the website is developed supports SEO Tags or not.
There were lots of issues with earlier versions of Asp.Net for detecting SEO related tags which made difficult for ASP.net developed website to be SEO friendly.
ASP.NET 4 includes a bunch of new runtime features that can help you to further optimize your site for SEO. Some of these new features include:
- New Page.MetaKeywords and Page.MetaDescription properties
- New URL Routing support for ASP.NET Web Forms
- New Response.RedirectPermanent() method
Below is a simple code snippet that demonstrates setting these properties programmatically within a Page_Load() event handler:
void Page_Load(object sender, EventArgs e)
{
Page.Title = "Example of setting title Programatically";
Page.MetaDescription = "setting Meta Description";
Page.MetaKeywords = "Asp.Net, Blog, SEO, and other keywords";
}
In addition to setting the Keywords and Description properties programmatically in your code-behind, you can also now declaratively set them within the @Page directive at the top of .aspx pages. The below snippet demonstrates how to-do this:.
<%@ Page Title="Page Title"
Keywords="Keywords"
Description="Description"
MasterPageFile="~/Site.Master"
CodeBehind="Exampleseo.aspx.cs"
Inherits="WebApplication1.Exampleseo" %>
Posted By Internet Marketing Dubai
No comments:
Post a Comment