How to add Meta Description on web page?

 Posted by vishalneeraj-24503 on 12/1/2014 | Category: ASP.NET Interview questions | Views: 1376 | Points: 40
Answer:

using System.Web.UI.HtmlControls;

HtmlMeta meta_description = new HtmlMeta();
meta_description.Name = "description";
meta_description.Content = "Dotnet funda.com";
Page.Header.Controls.Add(meta_description);


Output:-
<meta name="description" content="Dotnet funda.com" />


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response