3

I want to render MVC controls in non-MVC ASP.Net pages. Is this possible?

2 Answers 2

1

RenderPartial is an extension method that extends the HtmlHelper. The HtmlHelper's constructor takes a ViewContext. All 3 of those are in the System.Web.Mvc namespace. So, you'd have to a the very least reference the Mvc dll. You would also need to create an HTML helper by creating the other 2 objects. I'd be interested if you got it work, but I don't know if it's possible.

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

Comments

0

We need to reference the MVC dll into the project and also need to define similar structure like Route.config which will have default rout. Also we would have Model, View and Controller folder, in which we should have the Views web.config as well

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.