Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modifying Page ViewState in a Method
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00946814
Message ID:
00947141
Views:
21
>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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform