Pizzor2000 Posted February 21, 2006 Posted February 21, 2006 Is it possible to get a Windows Forms UserControl onto a web form in an ASP.Net project? I am using C#. My solution has an ASP.Net Web Application, which I am naming CtlTest. I also added a Windows Control Library, MyCtl, to this solution. I added a UserControl named MyTestCtl to the control library. I used an <OBJECT> tag to place the control onto an ASP.Net form, as below: <form id="Form1" method="post" runat="server"> <object width="100" height="100" id="someControl" classid="bin/MyCtl.dll#MyCtl.MyTestCtl" VIEWASTEXT> </object> </form> With this code, the page builds and runs without an error, but the control appears only as a grayed-out text box. Am I doing something wrong, or are there special measures which must be made on the control to be available on a web page? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.