ActiveX event and ASP.NET??

  • Thread starter Thread starter Drebin
  • Start date Start date
D

Drebin

I have an ActiveX control that we got from a vendor that authenticates a
user. It only exposes a single event, when the user was validated
successfully. That abstracts and protects us from seeing the password.

In ASP, I would just create a vbscript "MyControl_Authentication(blah,
blah)" function, to "catch" that event. This doesn't seem to work in
ASP.NET.. I need to probably populate a hidden text box (for viewstate
purposes), and then force a postback.. put I can't even get as far, as
having that vbscript function fire..

I've read around the newsgroups - lots of people have asked this question
and it never has been answered!!

Any ideas?
 
Just so some poor soul searching google has the answer, it turns out what
the solution for this is (for some unknown reason) you have to write out the
component in the Page_Load.. then your client-side script will see it..
Example:

string strControl = "";
strControl += "<OBJECT id=\"Authentication\" style=\"Z-INDEX: 102; LEFT:
171px; POSITION: absolute; TOP: 58px\"
codeBase=\"blah.cab#Version=4,9,0,22\"
classid=\"clsid:C34458B8-37A0-11D7-AF6D-0004AC5DE2C8\" VIEWASTEXT>";
strControl += "</OBJECT>";
this.Div3.InnerHtml = strControl;

this makes NO sense to me, because when I did a view source, I saw the
control and the CLIENT side script - so 100% of handling that ActiveX
control and the events that it fires should've been completely handled by
the browser. So I don't know why this doesn't work - but it does.
 
Back
Top