J
jyanmin.fang
Hi,
In my current project, I need to embed an .NET winform usercontrol in
the aspx page (via <Object> tag). This winform usercontrol has an
event called DoEvent (void DoEvent()). This winform usercontrol will
fire this event upon certain action by the user. I tried to let the
aspx page subscribe to this event via
<script for="winObj1" event="DoEvent()" language="javascript">
window.alert("window control event happen!");
</script>
but the event was never fired. Any idea?
here are some code snippet, for aspx page
<script for="winObj1" event="DoEvent()" language="javascript">
window.alert("window control event happen!");
</script>
....
<body>
<Object id="winObj1" classid="WinObj.dll#WinObj.UserControl1"
VIEWASTEXT>
</Object
<body>
for winform usercontrol
delegate void DoEventHandler();
public event DoEventHandler DoEvent;
public void onDoEvent()
{
if(DoEvent != null)
DoEvent();
}
In my current project, I need to embed an .NET winform usercontrol in
the aspx page (via <Object> tag). This winform usercontrol has an
event called DoEvent (void DoEvent()). This winform usercontrol will
fire this event upon certain action by the user. I tried to let the
aspx page subscribe to this event via
<script for="winObj1" event="DoEvent()" language="javascript">
window.alert("window control event happen!");
</script>
but the event was never fired. Any idea?
here are some code snippet, for aspx page
<script for="winObj1" event="DoEvent()" language="javascript">
window.alert("window control event happen!");
</script>
....
<body>
<Object id="winObj1" classid="WinObj.dll#WinObj.UserControl1"
VIEWASTEXT>
</Object
<body>
for winform usercontrol
delegate void DoEventHandler();
public event DoEventHandler DoEvent;
public void onDoEvent()
{
if(DoEvent != null)
DoEvent();
}