Reputation: 38003
In my ASP.NET MVC project I have a requirement to return certain pages in a database-driven way, i.e. the ASP page code is stored in the database, I need to retrieve it and return that.
I tried doing this using a ContentResult, but the problem I'm finding is that all the special characters denoting server-side script are coming through literally and being displayed in the browser.
How do I return an ActionResult that behaves as an ASP page, not as content?
Upvotes: 0
Views: 65
Reputation: 27431
You can't do that. ASP (Active Server Pages) is meant to be interpreted by the web server and only on the server-side. You'd have to write your own client-side ASP interpreter with something like JavaScript to be able to do what you want to do (who knows, maybe that already exists - I haven't looked). But this sounds like a very, very bad idea.
Upvotes: 4