![]() |
|
|
|||||||
![]() |
ASP Net - How to create Activex Control using C# and Use it in ASP.NET webform? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello
I would like to create Activex Control uisng C# and use it in ASP.Net webform. User Control is not solving my requirement so I am going for Activex Control. Please guide me on this, how to do it, if any sample is provided will be of great help Thanks EJ =?Utf-8?B?RUoxMDAz?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi E J,
From your description, you're wanting to create an ActiveX control via C# and use it in ASP.NET web page, yes? As for the question, here are some of my suggestions: 1. Since C# is a dotnet based language, it only support building managed component or control(.net code). And there is not buildin means for developing COM or ActiveX COMPONENT directly in .net(C# or VB.NET). I think we still need to use C++ or VB(I recommend this since it'll save us a lot of time) to develop COM or ACTIVEX compoents or controls. 2. There is one feature called Interop in .net which help to expose COM/ActiveX components to dotnet or expose .net components/control to COM interfaces. So there is means that we develop an .net winform control and expose it as an ACTIVEX control and use it. The following tech article has dicussed on this: #Simple way to expose a .NET WinForm control as an ActiveX control in any HTML page http://www.codeproject.com/cs/miscct...wincontrol.asp 3. As #2 has mentioned that we can expose a .net Winform control as activeX and use in web page. However, the .net has provide another nice feature ----------IE host Winform controls--------- which can directly help use Winform control in IE. I recommend that you have a look at this means. And here are some certain #Using Windows Forms Controls in Internet Explorer http://samples.gotdotnet.com/quickst...eSourcing.aspx #Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer http://msdn.microsoft.com/msdnmag/is...l/default.aspx #Embedded Windows User Controls into Internet Explorer http://www.devhood.com/tutorials/tut...l_id=187&print er=t http://msdn.microsoft.com/msdnmag/is...h/default.aspx Hope helps. Thanks. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] |
|
|
|
#3 |
|
Posts: n/a
|
HI Steven
Thanks for the valuable suggestions I tried using Winform User Control in ASP.Net webform, but I am having trouble using it. When a winform User Control contains WebBrowser control in it, the user control is not getting displayed. Just blank text box kind of control is getting displayed depending upon the specified size and width. The properties in IIS for the hosted control site is set to Execute Sctipt . Any other settings is required for this to be run Thanks Vani =?Utf-8?B?ZWoxMDAz?= |
|
|
|
#4 |
|
Posts: n/a
|
Hi Ej,
I found that the problem in this issue is just caused from the one mentioned in another thread in this newsgroup The title is Subject: Firing Click events and Reading IFrame Source of External URL in ASP.NET web form Is it right? I think your problem is not with the winform control but with your security setting on the client machine. You need to adjust the Code Access Seurity on the client machine so as to allow the winform control execute in the client machine's IE host CLR enviroment. I've posted my reply in that thread and also have send a mail and attached my demo project and some related screen shots. I send it via the following address : If it is not correct, please feel free to let me know and I'll resend. Also, if you feel it convenient that we continue to discuss in that thread, please feel free to post here. Thanks. Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx Steven Cheng[MSFT] |
|
|
|
#5 | |
|
Junior Member
Join Date: Aug 2006
Posts: 2
|
Hi Steven,
Is there a way to expose the windows form(developed in c#) outside of .Net environment? I have seen an article which talks about my requirement but its on beta version(and the article dates back to 2001). The article is at: http://www.codeproject.com/cs/miscct...etcontrols.asp Is it still possible to create ActiveX control as described in the above article? Thanks, Sridhar. Quote:
teluksridhar |
|
|
|
|