How to add Meta Keywords on web page?

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

First import System.Web.UI.HtmlControls Namespace at the top of the page.
using System.Web.UI.HtmlControls;

HtmlMeta meta_keywords = new HtmlMeta();
meta_keywords.Name = "keywords";
meta_keywords.Content = "Dotnet";

When run the page,and viewing page source,then we can see Meta Keyword as shown below:-

</title><meta name="keywords" content="Dotnet" />

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response