Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be interpreted as a bug?
Message
De
30/05/2006 10:22:21
 
 
À
30/05/2006 08:08:44
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:
01125870
Vues:
30
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform