RSS

Category Archives: .net

Add Seo Tag into Aspx

http://blog.codespecies.com/2013/01/adding-meta-tag-on-asp-net-content-page/

We can add it’s several way.

  • On aspx page
  • Server side code

On aspx page:

First we need add a asp:ContentPlaceHolderon on master page.

For example:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<asp:ContentPlaceHolder ID="seoPart" runat="server">
</asp:ContentPlaceHolder>

Now add meta custom meta tag on content aspx page. For Example:

<asp:Content ID="seo" ContentPlaceHolderID="seoPart" runat="server">
<meta name="keywords" content="Software development">
<meta name="description" content="this is ">
</asp:Content>

Server page Code:

Add following code on .cs file.

Page.MetaKeywords = "keyword1, keyword2, keyword3";
Page.MetaDescription = "Example of new meta tag";
 
Leave a comment

Posted by on February 26, 2014 in .net