I have this code
protected void Page_Load(object sender, EventArgs e)
{
DataSet.DestinationsDataTable GetDestinations = (DataSet.DestinationsDataTable)dta.GetData();
Page.Title = GetDestinations.Rows[0]["Meta_Title"].ToString();
HtmlMeta hm = new HtmlMeta();
HtmlHead head = (HtmlHead)Page.Header;
hm.Name = GetDestinations.Rows[0]["Meta_Desc"].ToString();
hm.Content = GetDestinations.Rows[0]["Meta_Key"].ToString();
head.Controls.Add(hm);
}
And it's returning this error (on a content page)
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Thoughts?