Hi Friends,
I have Windows User Control hosted in IE. I want to handle event in IE (javascript) raised by windows user control. I tried with COMInterop and using Javascript's for and event attribute. But it did not work as expected.
Appreciate your help.
Thanks,
jitendra

Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jan 14, 2008, 11:08 AM EST
U can write the function on parent page where u want to handle its event suppose ur button in ur control is Button1 and on parent page u want to handle it using function Button1Handler() on its click though javascript refresh the parent page like:
Button1.Attributes.Add(“OnClick”, “__doPostBack('','Button1Click');”);
On the page where u have used the control on its Page_load check the events argument like:
If (Me.Request.Params("__EVENTARGUMENT") = " Button1Click ") Then
Button1Handler()
EndIF
when ever Butto is clicked on control the function Button1Handler() of parent will be called to handle it
cheers,
niradhip