handling activex events

F

Felipe Garcia

i have some old asp pages that uses activex controls. At the moment, my
company are converting all of these old asp pages to asp.net. So my question
is, there is a way to handle activex events in the asp.net code behind.
<SCRIPT FOR="WEBDECODER1" EVENT="onaction" LANGUAGE="VBScript">
dim myaction
dim sig, format, captureTime
set myaction= action1
sig = myaction.Signature
myform.submit
</SCRIPT>
I want to handle this event on the code behind of my aspx page. Is there a
way to do this ? If not, what's the best way to do this inside asp.net ?


Thanks.
 
C

Craig Deelsnyder

i have some old asp pages that uses activex controls. At the moment, my
company are converting all of these old asp pages to asp.net. So my question
is, there is a way to handle activex events in the asp.net code behind.
<SCRIPT FOR="WEBDECODER1" EVENT="onaction" LANGUAGE="VBScript">
dim myaction
dim sig, format, captureTime
set myaction= action1
sig = myaction.Signature
myform.submit
</SCRIPT>
I want to handle this event on the code behind of my aspx page. Is there a
way to do this ? If not, what's the best way to do this inside asp.net ?


Thanks.

I think that script is client-side VBScript, meaning you want to keep
that there. That doesn't need to go in the code-behind (nor would you
want it to). You can still have <SCRIPT>s in your aspx for client-side
scripts (just make sure not to set runat=server). So you should be able
to leave this as-is, unless it isn't passing values back correctly to
the backend when the form is submitted.

Also, if you are populating form values in this script, and these fields
are ASP.NET controls on the backend, you'll need to reference their
..ClientID instead of what their ID is in the code-behind (ASP.NET
creates a different ID for the control in the HTML). Meaning you'd want
to add some ASP.NET code to the aspx above to spit out the
serverControl.ClientID in place of sig, for example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top