Hi All,
I am using some custom win controls in my webapplication, There was
one requirement where i have to raise a event of control's from my
aspx's JavaScript where that control was placed,
For that i have followed the article of MSDN "Sink Managed C# Events
in Internet Explorer Script " (
http://support.microsoft.com/kb/313891)
and i have added COM interface code (see the MSDN link for complete
details) and also added proper methods in my aspx page with
JavaScript method.
the control;s code is like -->
public delegate void event_to_Raise(string parm1,string parm2);
[GuidAttribute("B5BD6C89-D229-4039-A6FC-766177B17906")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceI sIDispatch)]
public interface ControlEvents
{
[DispIdAttribute(0x60020000)]
void event_to_Raise(string parm1,string parm2);
}
[ClassInterface(ClassInterfaceType.AutoDispatch),
ComSourceInterfaces(typeof(ControlEvents))]
and in client script is -->
<script language="javascript" event="event_to_Raise(parm1,parm2)"
for="myControl1">
function myControl1::event_to_Raise(parm1,parm2)
{
//some operation code
}
</script>
The logic is working fine when the .net version 1.0 is present in
client m/c where we are using the applications It is firing that event
and returning all required values properly but when i install the .net
2.0 framework on that client m/c , it stop working, even it will not
work when server m/c contain .net 1.0 frameworks but the client m/c
contain the frameworks 2.0 or above. It will never work for a browser
where the .net framework is 2.0 or above is intalled
Does anyone have any idea about this strange problem ?