I don't know if this is a stupid question but..
Is it possible in either ASP.NET (either C# or VB#) to Response.Write() the contents of another HTML file? If so, how?
I don't know if this is a stupid question but..
Is it possible in either ASP.NET (either C# or VB#) to Response.Write() the contents of another HTML file? If so, how?
You can get all the lines into a string array and send them out directly.
string[] lines = File.ReadAllLines("path/to/my/file.html"); foreach(string line in lines) { Response.Write(line); } Just don't forget to set your headers up correctly because this will just inject HTML. It won't set up any special headers that might be expected (if any).