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:
01374490
Vues:
25
This message has been marked as the solution to the initial question of the thread.
>
>First of all, thanks for your help!
>
>Problem with trying your interface approach is that it appears that (looking at your example) I still have to inherit my _Default page when declaring the interface (same problem).

Try this:

If you don't have an App_Code folder already, right-click on the project and select Add ASP.NET Folder, then App_Code. Right-click on App_Code and create a new class. Let's call it Interfaces. Modify the class to include a namespace and turn it into an interface definition, ex:
namespace MyApp.Interfaces
{
    public interface IMyWebPage
    {
        void UpdateText(string newText);
    }
}
Namespace MyApp.Interfaces
   Public Interface IMyWebPage
      Sub UpdateText(ByVal newText As String)
   End Interface
End Namespace
Now go back to your user control - you should be able to type: MyApp.Interfaces and see Intellisense pop-up for the IMyWebPage interface.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform