Last post Apr 28, 2009 09:24 AM by jason_steven
Apr 26, 2009 06:26 AM|jason_steven|LINK
Does anyone know how asp.net 2.0 can dynamically write a .html file without saving it to the server.
Can you stream a file down to the browser, anything.html, without anything.html physically being on the hard drive?
I hope this makes sense.
Note:I want to create a completely seperate page with its own unique url only existing in the users' browser with its own name.
Any help or hint would be appreciated!
Apr 26, 2009 09:55 AM|MaunoMato|LINK
Create new Generic handler and change content type to "text/html".
Then add this line to web.config: (replace type name to handler):
<add verb="*" path="*.html" type="WebApplication3.Handler1, WebApplication3" validate="false"/>
It should work now.
Below is code for my test handler:
public class Handler1 : IHttpHandler
public void ProcessRequest(HttpContext context)
context.Response.ContentType = "text/html";
//Replace below to whatever you want
public bool IsReusable
Apr 28, 2009 09:24 AM|jason_steven|LINK
Thank you for so quick reply!