Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be interpreted as a bug?
Message
From
30/05/2006 10:22:21
 
 
To
30/05/2006 08:08:44
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:
01125870
Views:
32
>I suggested GetType() not ToString(). ToString() can be overridden and if for any case it's overridden to return something else then it'd break. You might rely on that you'd never override but I think GetType() is the way to go.

Thanks, I adjusted:
            For lnCounter = 1 To oApp.ParmCnt(tcID)
                lcControl = oApp.GetParm(tcID, lnCounter)
                loControl = oApp.oPage.FindControl(lcControl)

                ' If the control is an image
                If loControl.GetType().ToString = "System.Web.UI.WebControls.Image" Then
                    loControlImage = CType(loControl, System.Web.UI.WebControls.Image)
                    loControlImage.ImageUrl = oApp.cLanguage + "/" + loControlImage.ImageUrl
                End If

                ' If the control is an imagemap
                If loControl.GetType().ToString = "System.Web.UI.WebControls.ImageMap" Then
                    loControlImageMap = CType(loControl, System.Web.UI.WebControls.ImageMap)
                    loControlImageMap.ImageUrl = oApp.cLanguage + "/" + loControlImageMap.ImageUrl
                End If

            Next
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