How to Add Meta Tags Properties programmatically in ASP .NET

Leave a Comment
In this article, we have to learn how to add meta properties like title, meta keyword and meta description in Asp.Net Page.

You can add meta properties programmatically like below code-

Example
protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Wel Come to StudyOverflow.Com";
            Page.MetaDescription = "Your Meta Description here...";
            Page.MetaKeywords = "Your Meta Keywords here...";
        }

You can also add static Meta Properties like below code in designer page.
<%@ Page Title="Title here.." MetaDescription="description here.." MetaKeywords="keywords here..." Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

0 comments:

Post a Comment