Your GSEO.net Account   Login | Upgrade
Global SEO - The Best SEO Outsourcing Solution
An IM Community to Learn, Promote & Connect

You are here : Home » Latest Blogs » asp.net seo

Gseo.net Blogs

Seo Consultant

Dynamic SEO - Master Page Search Engine Optimisation

Cijo AbrahamMani - is the Manager (Web Portals) of Kerala Holidays Pvt Ltd in India and for more details about his services you may contact him via Cijo Abraham Mani Linkedin Profile or profile.
0
0

Today in my blogpost I am going to discuss about dynamic ASP.NET master page search engine optimisation. Master page is a feature in ASP.NET that helps website to keep the site layout consistent throughout all the website. Any changes to the website can be made at a single point if master pages are used. The main issue while creating master pages are that the title and meta tags will be same throughout the website as well. To avoid the same we should add Unique Title element to the content pages and Meta tags to seperate Code behind Webforms (example index.aspx.cs file).

The code for Title in Content pages is

@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" Title="Untitled Page"

Replace the Untitle Page with appropriate Title.

Here is the code for webforms

In your Content Pages you need to find the Master Page Control head1, to find that use the following code:

HtmlHead header = (HtmlHead)Master.FindControl("head1");

Now that you have your header you can add controls to it using the header.Controls.Add method. Create an HTML Meta DescriptionTag now and add it to your header:

HtmlMeta description = new HtmlMeta();
description.Name = "Description";
description.Content = "This is the description associated with this content page";

header.Controls.Add(description);

Make sure that you are using head1 and runat="server" attribute in your Master Page.

Cijo Abraham Mani is a regular blogger on GSEO. He is currently working as Manager(Online Marketing) in a reputed software firm. He also does freelance work for florida based orthopaedic associates. He is a leading social media consultant and strategist and can be found at Linkedin and on Twitter.






http://www.gseo.net/myajax/ajax-loader.gif