Software development industry analysis by Larry O'Brien, the former editor of Software Development and Computer Language
Wednesday, December 22, 2004

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?

Wednesday, December 22, 2004 9:34:52 PM (Hawaiian Standard Time, UTC-10:00) |  Disqus link  | #
Search
About Larry...
Flickr photostream
Subscribe: RSS 2.0 Atom 1.0
Popular Articles
Programming Sabre with Java, C#, and XML
Genetic Programming in C#
15 Exercises To Know A Programming Language
Top 10 Things I've Learned About Computers From the Movies and Any Episode of "24"
Recently Published Articles
HI
KonaKoder
Categories
Archive
Admin Login
Sign In
Toolroll