Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User control call page method?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01374382
Message ID:
01374545
Vues:
14
>>
>>I can declare the interface in my ASCX control
>>
>>Dim ThePage As FacilitiesManagement.Interfaces.IMyWebPage
>>
>>But this does not actually give me access to the page. ThePage is still Nothing. Somehow I have to instantiate it so it references my page?
>>
>
>Hmm, yeah, now that I look at the code I posted I realize it's not right - what we're trying to do here is cast the Page object to IMyWebpage. I guess VB doesn't do this quite the same way as C#, so my code I posted is wrong. It looks like it should actually be something like:
>
>
>Dim ThePage As FacilitiesManagement.Interfaces.IMyWebPage = TryCast(Page, FacilitiesManagement.Interfaces.IMyWebPage)
>
I think it's CType() in VB.Net
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform