Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modifying Page ViewState in a Method
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00946814
Message ID:
00947141
Vues:
19
>Found a way to do this without ( I hope :-) ) violating OOP principles. Instead of passing the Page to the method I am passing the ViewState itself and after testing this seems to work fine. The method receiving the call would look like (C#):
/***********************************************************************/
public static void MyViewStateMethod(System.Web.UI.StateBag pagViewState)
/***********************************************************************/
{
pagViewState["MyProp"] = ...
// More code ...
}
and the method call would look like:
MyModule.MyViewStateMethod(this.ViewState);


Very smart idea! I appreciate you passing that along.

Thanks,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform