Assuming your page does not have a masterpage, you can just use it like this:
Header.Keywords = "key1, key2";
Header.Controls.Add(new HtmlMeta(){Name = "description",Content = "my description"});
and that will actually render:
<head><title>
</title>
<meta name="description" content="my description" /><meta name="keywords" content="key1, key2" />
</head>
you need the header with
runat
="server" for this to work. if you have a master page you need to do it from there.
but I think your error is about something else.