Load UserControl .ascx with Asp.Net Core WebApplication - C# RRS feed

  • Question

  • I have the following scenario. in a WebForm application, it loaded a UserControl (.ascx) and added it to a Panel and rendered it on a WebForm.aspx page. Now I need to load this UserControl.ascx and render it in an Asp.Net Core Web Application project. It's possible?

    My current scenario (Asp.Net Web Application)

    Control ctrl = LoadControl("MyControl.ascx");

    Implementation in c# asp.net core (Asp.Net Core Web Application )



    Cesar - MCP

    • Moved by CoolDadTx Thursday, April 16, 2020 1:36 PM ASP.NET related
    Wednesday, April 15, 2020 8:54 PM

All replies

  • hi César,

    Thanks for posting your question here, I think you better ask your questions here https://forums.asp.net/ about asp .net ! And UserControl (*.ascx) not supported  in asp.net core you can use Partial Views  

    Please remember to mark the replies as answers if they helped you :) ~

    Wednesday, April 15, 2020 10:42 PM
  • ASP.NET Core works ASP.NET MVC and ASP.NET Razor Pages, and it does not work with ASP.NET Web forms. 
    Thursday, April 16, 2020 12:15 AM