Probably a simple question, but now I look through 30 minutes and STILL cannot find a solution!
I have a panel and it has the text = "something" attribute. but the panel class doesn't seem to have a getAttribute method ... Which personally, I think, is STUPID!
Code follows:
foreach (Control c in clientGrid.Controls)
{
if (c.GetType().ToString().Equals("System.Web.UI.WebControls.Panel"))
{
textInsidePanel = ((Panel)c).
}
}
Now I have tried AttributeCollection text = ((Panel)c).Attributes;
and
string text = ((Panel)c).Attributes.toString();
and other useless things ...
It should be very simple! when I check an element on chrome, I see a panel, (well, a div), and I see a text attribute right there. and I see its value! but I want my C # code to matter!
Please, help!
Alex
source
share