Windows Forms Control in IE not responding to JavaScript calls
I have a problem with a Windows Forms control wrapped in a DLL and deployed in IE in an Object tag. The object should return a string that Javascript puts in a hidden field, ready to be sent to the server. This is the approach I have used several times, but now I am getting the dreaded "Object does not support this method or property" error from Javascript. I've narrowed it down to calling a function that returns a string.
Things I've eliminated:
- Spelling errors when calling a function
- The called function is a public function
- Permission errors - everything runs on localhost, trusted sites, etc.
Things that might matter:
- The dll contains several classes that are used in the control
- The control is customizable but uses different Windows Forms controls.
- The main thread is that the control (which allows users to enter multiple pages of drawings) builds an object that is serialized and outputted to a base 64 line. Javascript calls the output function and puts the (compressed) string into the hidden control. The form is submitted and the string is sent back to the server for processing.
If anyone could help I would appreciate it.
<body>
<script language="javascript" type="text/javascript">
function GetValues(){
alert(document.draw1.ReturnSerialisedObjectString());
return true;
}
</script>
<input type="hidden" id="hdnData" runat="server" />
<input type="button" onclick="javascript:return GetValues();" value="Click Me" />
<br /><br />
<object id="draw1" classid="SlainteCustomControls.dll#SlainteCustomControls.FreeFormControl" width="482" height="579" viewastext />
0
a source to share