For the keywords you can try the following:
System.Web.UI.HtmlControls.HtmlMeta pageKeyWords = new HtmlMeta();
pageKeyWords.Name = "keywords";
pageKeyWords.Content = "Keyword list from databasefield or function";
Page.Header.Controls.Add(pageKeyWords);
and then just set the Content property to whatever value you want it to be. For the title you can use
Page.Header.Title
Hope this helps.