Ocx which developed by FMC add to Asp.Net

GuoJunjie 20 Reputation points
2023-02-27T03:04:45.88+00:00

I have developed an OCX by MFC AcxtiveX in Vs2019. This OCX can be added to Toolbox in Winform. But can be added to ASP.NET toolbox. When I tried to add it to toolbox. A Error massage occurs “The controls is successfully added to toolbox ,but it can be enabled in current design”. How to solve the problem?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,238 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,566 questions
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 27,031 Reputation points Microsoft Vendor
    2023-02-27T09:12:27.69+00:00

    Hello @GuoJunjie ,

    Welcome to Microsoft Q&A forum.

    The error message did mention => The control is successfully added … but it can’t be enabled in current design. So you may consider why it can’t be enabled. Probably you didn’t open the designer view for one of the web page that you are developing on.

    Please try to select and right-click the file(for example, xx.aspx) => click "View Designer" => and then try to add your control to the toolbox(right-click any white space in Toolbox window => click "Choose Items…" => switch to "COM Components" tab => check your control => confirm if it is added successfully and listed in Toolbox window).

    Please feel free to contact us, have a nice day.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. GuoJunjie 20 Reputation points
    2023-03-02T01:32:57.58+00:00

    Dear Albert Kallal :

    Thank you very much. I’m newer for Web App developer. We have developed a package Wpf Application for industry real time control with some third wpf’s dll. Now we want to transfer part of control information to Web . The Wpf App is still be used and extend for new requirements . We wangt to refresh the Web App at same time . Is there any way to do that within Vs2019?

    Thank you very much for your help again.

    0 comments No comments

  2. GuoJunjie 20 Reputation points
    2023-03-02T02:21:28.62+00:00

    User's image

    I was to it with way you recommended as follows

    User's image

    But in the toolbox. It still shows a gray icon and can’t be added to designer

    If I switch to the Winform designer the Ocx is OK.

    How to solve the problem