Hi Pipo,
As for the delegate serialization problem you mentioned, here are my
understandings:
I think the problem why you can't retrieve the stored delegate from the
control's VIEWSTATE when post back is because such object like delegate is
unable to be maintain(serialized) in ASP.NET web application
enviorment. As we know , the ASP.NET is request/response based, and all the
page objects and controls(on the page) only exist during the page's
serverside processing period(their lifecycle). So if you use a delegate to
reference a page class object(or another class's member fucntion) and
serilize it into VIEWSTATE or SessionState, then the next time the page is
post back, the Page class instance(and the controls on it or local
variables) are all new created ones , their methods info will be different
from the ones you persistent in the previous VIEWSTATE or SessionState.
That cause the problem, do you think so?
So I think we still need to bind the delegate via code every time in the
control 's init period rather than store in VIEWSTATE . Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx