0

How can I load an ascx control in an ASP.NET MVC? I'm using url.action in src but it is not working. Can i do that?

1 Answer 1

1

If you want the ascx to appear in the response then you can use the Html.Partial or Html.RenderPartial methods.

If you want to have an IFrame in the response that will load some other page, then you cannot use an ascx control alone. You will need a full view (aspx) that is returned from some action method. The full view could use Html.Partial and Html.RenderPartial to render your ascx.

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.