Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User control call page method?
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01374382
Message ID:
01374545
Views:
22
>>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform