Hallo,
so dürfte es funktionieren:
foreach (Control c in pnlRow.Controls)
{
if (c.GetType() ==
typeof(System.Web.UI.WebControls.Label))
c.Visible = false;
}
Gruß
Stefan Sturm
newCOMer GmbH Stefan Sturm
Schmidstraße 32-34 Fon: +49 99 42 - 95 61 71
D-94234 Viechtach Fax: +49 99 42 - 90 20 75
www.newcomer.de [EMAIL PROTECTED]
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Henri Löbel
Gesendet: Donnerstag, 8. September 2005 13:43
An: [email protected]
Betreff: [Asp.net] Ausblenden aller Label Controls
Hallo,
ich meine hier in der Mailingsliste schon einmal so was gesehen zu haben:
Ich bräuchte die korrekte Syntax für diesen Pseudo-Code:
foreach (Control c in pnlRow.Controls)
{
if (c.Type == System.Web.UI.WebControls.Label)
c.Visible = false;
}
Problem ist hierbei, dass ich nicht weiß, wie ich den Type herausbekomme und
entsprechend vergelichen kann.
Wer hilft mir?
Henri
BEGIN:VCARD
VERSION:2.1
N:Sturm;Stefan;;Herr
FN:Stefan Sturm ([EMAIL PROTECTED])
ORG:newCOMer GmbH
TEL;WORK;VOICE:0 99 42 - 90 20 73
TEL;WORK;FAX:0 99 42 - 90 20 75
ADR;WORK:;;Schmidstraße 32-34;Viechtach;;94234
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Schmidstra=DFe 32-34=0D=0AViechtach 94234
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20050308T145705Z
END:VCARD