Hello,
A newbie to C# here. I would like to use a C# third party library Control 'xyzCtrl' (inherited from PictureBox and another custom class) in ASP.NET Web Application. How can I do that?
xyzCtrl renders continuously changing image data (BitMap) on the form.
Thanks.
Loading
Posted Oct 15, 2010, 5:56 AM
panel1.Controls.Add(this.captureImageBox). -- Here you can add webcontrols only, you can't add windows forms controls.
This is the reason you are getting cast error.
Instead of adding the control in the runtime, try to add the control in aspx design time itself.
<object id="myName" classid="http:WindowsFormsControlLibrary1.dll#WindowsFormsControlLibrary1.UserControl1"
height="500" width="500" />
Hope this helps you.
HemanthPosted Oct 14, 2010, 1:59 PM
panel1.Controls.Add(this.captureImageBox).
This resulted in the image being continuously rendered on Application form.
Now, when I try to do the same in Web Application (asp.net), I am not able to cast PictureBox to a recognizable Web Control.
HemanthPosted Oct 14, 2010, 1:44 PM
Anyway, reg what is accomplished in the articles - Can it be easily done by just adding a new reference in Project->References->Add Reference->System.Windows.Forms dll?
I have added the third party library to the Visual Studio tool box on a new tab. But, none of the items show up in the Web Project. They show up in a Forms project.
Posted Oct 14, 2010, 1:02 PM
http://steveorr.net/articles/WinformControls.aspx
Hope these links will help you.