How to set title and description and keyword of Page:-
I Have one way can any one suggest other way
Required Name space
using System.IO;
Calling of Functions:
updatePageTitle(DevNameStr);
updatePageKeywords(DevKeywords);
updatePageDescription(DevDescription);
Function For Updating title,Key words And Meta description
private void updatePageTitle(string tempTitle)
{
if (tempTitle.ToString().Trim().Length > 0)
{
Page.Title = "Delhi Residential :: " + tempTitle.ToString();
}
else
{
Page.Title = "Delhi Residential :: Flats :: Builder Floors";
}
}
private void updatePageKeywords(string tempKeywords)
{
HtmlMeta hmKeywords = new HtmlMeta();
hmKeywords.Name = "keywords";
if (tempKeywords.ToString().Trim().Length > 0)
{
hmKeywords.Content = "Delhi Residential, Flats, Independent Houses, sale, rent, North Delhi, real estate organization, Suraj Real Estates";
}
else
{
hmKeywords.Content = "Delhi Residential, Flats, Independent Houses, sale, rent, North Delhi, real estate organization, Suraj Real Estates";
}
HtmlHead head = (HtmlHead)Page.Header;
head.Controls.Add(hmKeywords);
}
private void updatePageDescription(string tempDescription)
{
HtmlMeta hmDescription = new HtmlMeta();
hmDescription.Name = "description";
if (tempDescription.ToString().Trim().Length > 0)
{
hmDescription.Content = "SURAJ REAL ESTATE has successfully assembled multi-disciplinary teams of highly qualified professionals, each with many years of relevant experience in domestic as well as international markets.";
}
else
{
hmDescription.Content = "SURAJ REAL ESTATE has successfully assembled multi-disciplinary teams of highly qualified professionals, each with many years of relevant experience in domestic as well as international markets.";
}
HtmlHead head = (HtmlHead)Page.Header;
head.Controls.Add(hmDescription);
}
Sushat