I think you want to set meta tag from code ..
(using below code you can set different meta tag/title for each page-which is required for seo)
Call below function in Page_Load Event...
public void settitle(string s1, string s2, string s3)
{
HtmlTitle htmltitle = new HtmlTitle();
htmltitle.Text = s1;
Header.Controls.Add(htmltitle);
Page.Title = pagetitle;
HtmlMeta htmlmeta = new HtmlMeta();
htmlmeta .Name = "keywords";
htmlmeta .Content = s2;
Header.Controls.Add(htmlmeta );
HtmlMeta htmlmeta2 = new HtmlMeta();
htmlmeta2.Name = "description";
htmlmeta2.Content = s3;
Header.Controls.Add(htmlmeta2);
}
Source :
Add Dynamically Meta tage, title tag using c# code[
^]
If you find help from it plz upvote and mark as solution this.
Thanks