Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be interpreted as a bug?
Message
From
31/05/2006 00:26:57
 
 
To
30/05/2006 13:46:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01125597
Message ID:
01126077
Views:
27
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform