Answer: 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 funda.com";
Page.Header.Controls.Add(meta_keywords);
Output:-
When run the page,and viewing page source,then we can see Meta Keyword as shown below:-
<head><title>
</title><meta name="keywords" content="Dotnet" />
</head>
Asked In: Many Interviews |
Alert Moderator