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"] = ...
}
and the method call would look like:
MyModule.MyViewStateMethod(this.ViewState);
>
>Even though the ViewState collection does not show in intellisense you may want to try to access it anyway. The only reason I suggest that is that certain methods do not show in the intellisense of VB.net (ex: RegisterStartupScript) even though they are part of the page object and accessible.
>
>Hope that helps...
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.