Click to See Complete Forum and Search --> : Can only dot net controls be used on web forms?


Listerine
March 30th, 2004, 11:01 AM
I thought you could use any controls like vb controls or other older ocx's.

I see the article on MSDN talking about controls that can be used but it doesn't specifically say that all others are out, I was thinking this was going to be more vb like but I guess since its not a vb program....

So is there an easy way to take an ocx and create some web form control wrapper? I know you can make controls but I don't see how to inherit or insert or inject or inflate controls you might want to base yours on.

I have an ocx and I can get it to display on the web form I just cannot seem to use it, its always Nothing. There's not some sort of new I need to do.

I even have it list in the top with the Public withevents and the control has properties and I can see the functions in intellisense.

What am I missing besides the point?

Craig Gemmill
March 30th, 2004, 04:38 PM
There are a few options here, listed in most-likely-to-work order:

1) Re-create the control in .NET.

2) Create a wrapper:
http://supportweb.netmanage.com/ts_onweb/solutions/pdf/OnWeb_ActiveX_ControlandASP.NET.pdf

3) Try using the RUNAT="SERVER" element:
<asp:Textbox id="txtSomething" runat="server" size="5" />