10

I'm sure this is an easy one for most of you ... What is the best way to inject static HTML (from a html file on disc) into a View?

I want something along the lines of this:

<%= Html.RenderPartial(pathToMyHtmlFile) %>

1 Answer 1

16

WriteFile from the Response object might do what you want:

<% Response.WriteFile(pathToMyHtmlFile); %>
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.