-1

I wrote a C# Winform User Control as follows when Executable is Run:

enter image description here

My question is how we can use this Winform C# user control in one ASP Page. I know about WEB User Control and using in ASP but what about using WinForm User Control that design in C#?

  • 1
    You can't. They're different UI's, different classes, different namespaces... You can't. You might as well be asking how you use your Android UI code for iOS. – RubberDuck Mar 3 '16 at 23:05
  • @RubberDuck So any User Control in C# cannot be used in ASP.NET? – Mio Unio Mar 3 '16 at 23:09
  • @RubberDuck did you hear about Winform usercontrol hosted in ASP.NET? – Mio Unio Mar 3 '16 at 23:10
  • I guess it is possible. Then, 4GuysFromRolla says this: Second, while ASP.NET can host both Windows User Controls and Custom Controls, it cannot host Windows Forms. That post, as most I saw from a quick surf, is very old. Just saying. – radarbob Mar 4 '16 at 18:18
0

There is no way to do this with native ASP.NET pages and HTML. Controls on a fat client and a web page are fundamentally different.

However, you could embed an ActiveX control on a page and the ActiveX control could use your forms control. However, ActiveX controls are only supported on Internet Explorer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.