1

I need to render the .net user control(.ascx) in ASP .net core project. I can able to run the user control in MVC projects. Same way Can we consume user control ASP .Net Core or Can we add aspx page in asp.net core project?

2
  • No. Why don't you just reimplement the logic the ASP.NET Core way? Commented Jun 11, 2020 at 13:35
  • @mason We have the 3rd party user control which logic was written in ASP .Net webforms. We need to use that 3rd party assembly in our ASP .Net Core Project. Commented Jun 12, 2020 at 5:44

1 Answer 1

3

Same way Can we consume user control ASP .Net Core or Can we add aspx page in asp.net core project?

No, you can't use them in core projects, they are completely belong to different projects.

First you need to understand the function of user controls in the .net project, and then you can find the corresponding method in the core project to replace it.

User controls contain code which can be re-used. It can be used across application as per the requirement.

There are two similar concepts in the core project: Partial view and View component.

You can rewrite the logic in user control to partial view or view component.

You can refer to these two official documents, and then try to use them to replace user controls in the core project.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.