>The Page ViewState is a protected property so I do not see a way to pass a reference to the Page to a method in another assembly and modify the ViewState. I have a scenario in which I would like to do this. Is this a "duh!" situation in which I am missing something here or are we restricted to modifying the Page ViewState within methods in the Page itself?Bill,
Below is an example of how to setup such a routine in VB.net ... I'm not for sure what the syntax would be in C#, but I bet Kevin or Bonnie would know.
Public Sub RoutineName(ByRef pgSender As System.Web.UI.Page)
pgSender.ViewState("Test") = 1
End Sub
The important key there is ByRef so that you modify the ViewState of that page rather than a temp copy of the page.
Hope that helps...