Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obtaing strong type when passing a Web form
Message
De
09/05/2006 03:03:56
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Obtaing strong type when passing a Web form
Divers
Thread ID:
01120244
Message ID:
01120244
Vues:
45
From a Web form, in the Page_Load() event, I am calling a method and passing Me as a parameter. Within that method, what should I do in order to obtain strong type whenever I will use the parameter received?

For example, this is the method:
    Public Function AddMessage(ByVal toPage As Object) As Boolean
        toPage.ClaimInfo = "Something"
        Return True
    End Function
In the page, I have a label ID ClaimInfo. However, when I type toPage, it is not strong type.

In order to have the proper definition at the declaration, I did this:
    Public Function AddMessage(ByVal toPage As System.Web.UI.Page) As Boolean
        toPage.ClaimInfo = "Something"
        Return True
    End Function
But, doing this makes toPage to generate a design time error.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform