In my user control I want to read the ViewState dictionary of the
Parent control. But this sensible idea is not permitted by the
compiler:
Compiler Error Message: CS1540: Cannot access protected member
'System.Web.UI.Control.ViewState' via a qualifier of type
'System.Web.UI.Control'; the qualifier must be of type
'ASP.ItemOrderGrid' (or derived from it)
Source Error:
Line 5:Trace.Write( "LoadId", Parent.ViewState["LoadId"].ToString( )) ;
Do I understand this correctly? The parent control of a user control
is the Page control? Basically, I want the user control to be able to
access the state bag of the page it is instantiated on. Is that doable?
thanks,
-Steve