J
Jeremy Chapman
I want to access the viewstate of a page object from outside of the class
(in a helper class), so I made a class inherited from Page, and exposed a
property that returns the viewstate object. I my helper class I cast the
page to my page class and access the exposed property, but the cast causes
an 'Specified cast is not valid' exception. I used to do this in delphi and
c++ all the time to access protected stuff, is it possible in .NET?
(in a helper class), so I made a class inherited from Page, and exposed a
property that returns the viewstate object. I my helper class I cast the
page to my page class and access the exposed property, but the cast causes
an 'Specified cast is not valid' exception. I used to do this in delphi and
c++ all the time to access protected stuff, is it possible in .NET?