Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   ASP.Net (http://www.xtremevbtalk.com/asp-net/)
-   -   ActiveX (http://www.xtremevbtalk.com/asp-net/326246-activex.html)

holtzy 07-31-2013 01:36 PM

ActiveX
 
I am new to the ActiveX world, so any info is gladly welcomed. I have created an ActiveX control using VS2010 and VB. It is registered, strong signed, etc. I am at the point now where my lack of knowledge is coming into play and I have worked up a nice headache :).

In my code-behind for asp.net, I wish to call a function or set a property of the activeX control (i.e. Control1.DrawLine(new pointf(1,1))), but none of my public events that I created on the activeX control show up as an option.

I am currently getting the error: Value of type 'mycustomcontrol' cannot be converted to System.Web.UI.Control. The whole reason for me having to create it as an ActiveX control was so I could base it off of the windows usercontrol. Is it impossible to define this custom control in code-behind?

PlausiblyDamp 08-05-2013 04:00 PM

Just to check on what you are doing....

Are you embedding this ActiveX control in an ASPX page and trying to interact with it from the code behind?

If so then this isn't how it works, if the ActiveX control is embedded in the page it will effectively be downloaded to the client and will run on the client (in reality this might not actually work depending on the browser and the security settings in place on the client).

Server side code (code behind) will run on the server and will not have access to the control running in the browser.

holtzy 08-06-2013 06:55 AM

Yep, that is exactly what I was trying to do. I was doubting there was a way to do it. So to do this the way I need to it sounds like I have to write all interaction with the control/user in JavaScript. Bummer.

Thanks for the explanation!


All times are GMT -6. The time now is 10:23 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.