Instead do this:
foreach (DataRow dr in dt.Rows) { pnl = new Ext.Net.Panel(); pnl.Title = dr["pagename"].ToString(); pnl.TabTip = dr["description"].ToString(); // get icon from string icon = (Icon)Enum.Parse(typeof(Icon), dr["icon"].ToString()); pnl.Icon = icon; pnl.Layout = "FitLayout"; pnl.AutoLoad.Url = dr["relative_url"].ToString() + "?d=" + Request.QueryString["d"]; pnl.AutoLoad.Mode = LoadMode.IFrame; pnl.AutoLoad.NoCache = true; pnl.Border = false; // add to tabpanel tpPack.Items.Add(pnl); }where dr["icon"] is the icon name (duh). :)