Hi all,
I am trying to add meta:resourceke y's to database programmaticall y
looping throug webcontrols, but i cann't read the 'meta:resourcek ey'
from the webcontrol. The 'meta:resourcek ey' will not show up as
attribute. How can i get the value of the 'meta:resourcek ey' ?
THE CODE:
public string RetrieveControl s(Control myControl){
string stringHtml = "<ul>";
foreach (Control c in myControl.Contr ols) {
stringHtml += "<li>";
if (c is WebControl){
// This does not work ...
// if (((WebControl)c ).Attributes["meta:resourcek ey"] != null){
// stringHtml += ((WebControl)c) .Attributes["meta:resourcek ey"];
// }
stringHtml += c.GetType().ToS tring() + " [" +
c.Controls.Coun t.ToString() + "] ";
} else {
stringHtml += "No webcontrol";
}
if (c.Controls.Cou nt 0)
{
stringHtml += "<ul>" + RetrieveControl s(c) + "</ul>";
}
stringHtml += "</li>";
}
stringHtml += "</ul>";
return stringHtml;
}
I am trying to add meta:resourceke y's to database programmaticall y
looping throug webcontrols, but i cann't read the 'meta:resourcek ey'
from the webcontrol. The 'meta:resourcek ey' will not show up as
attribute. How can i get the value of the 'meta:resourcek ey' ?
THE CODE:
public string RetrieveControl s(Control myControl){
string stringHtml = "<ul>";
foreach (Control c in myControl.Contr ols) {
stringHtml += "<li>";
if (c is WebControl){
// This does not work ...
// if (((WebControl)c ).Attributes["meta:resourcek ey"] != null){
// stringHtml += ((WebControl)c) .Attributes["meta:resourcek ey"];
// }
stringHtml += c.GetType().ToS tring() + " [" +
c.Controls.Coun t.ToString() + "] ";
} else {
stringHtml += "No webcontrol";
}
if (c.Controls.Cou nt 0)
{
stringHtml += "<ul>" + RetrieveControl s(c) + "</ul>";
}
stringHtml += "</li>";
}
stringHtml += "</ul>";
return stringHtml;
}