Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be interpreted as a bug?
Message
De
31/05/2006 00:26:57
 
 
À
30/05/2006 13:46:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01125597
Message ID:
01126077
Vues:
30
>It's your code and would work this way 99.9%. It would be better IMHO if you compare type to type (w/o ToString() comparison). In C# it's as easy as:
>
>if ( loControl.GetType() == typeof(System.Web.UI.WebControls.Image) )
>
>However in VB I found it hard to find compatible code:
>
>if ( loControl.GetType().Equals( System.Type.GetType("System.Web.UI.WebControls.Image") ))
>
Cetin

I thought the addition of GetType() was the equivalent of what you mention. It does work well as is as I just tested it and it goes in for ImageMap when it is a type of ImageMap only and it goes in the other condition when it is a type of Image only.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform