Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC: RenderPartial for a static HTML file

Tags:

asp.net-mvc

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) %>
like image 883
Robert Claypool Avatar asked Jul 28 '09 19:07

Robert Claypool


1 Answers

WriteFile from the Response object might do what you want:

<% Response.WriteFile(pathToMyHtmlFile); %>
like image 164
Jon Benedicto Avatar answered Oct 25 '22 17:10

Jon Benedicto