Get the value of a Label from a general item
I have a grid with labels and text boxes.
I want to get the content of the label.
Very easy if you know it is a label.
But this is what I have:
foreach (var t in Grid1.Children)
{
if (t.GetType() == typeof(Label))
{
string val = t.????;
}
}
How do I get the content of this label?
No comments:
Post a Comment