I'm stumped. If anyone can help me, I'd appreciate a pointer.
In an ASP.NET page, I'm embedding a Windows Forms control by use of an \<object> tag. My challenge is getting the state of the embedded object during postback, and maintaining / restoring the object after postback. Since the object tag is not server-side, I can't figure out how to retrieve its state in my Page_Load() event.
The tactic that I was (mostly) pursuing was a client-side event-handler for the onblur() event of the \<object> tag, which would grab the state of the object (by way of reading a property, i.e., document.forms[0].myObject.MyProperty) and write it to a hidden \<INPUT> tag, which I figured I could retrieve on the server-side by looking at the Request object. So, basically, very non-ASP.NET-y in approach.
I don't know if this is the right approach and it certainly seems error-prone (at least, I spent the whole day today trying to watch the process by writing Javascript alert() functions -- a side question is 'how the heck do ASP.NET programmers debug Javascript?' ). Any feedback appreciated.
Am I doomed to handle the state / postback issue by writing separate HTTP POST/GETs within the embedded Windows Forms object?