SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Feb 18, 2008, 11:27 #1
- Join Date
- Aug 2002
- Location
- Washington D.C
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Set http response = to an html file
Does anybody know how to sent the response of a page to output the contents of an html page? I've tried response.redirect yet this was not the desired result as the URL changed. I also checked out response.writeFile that seem to work yet noticed the contents of the desired page did not show up in the DOM. Any suggestions? Streaming the contents of the other html file seems like it would work but just wanted to know if there was built in method I could take advantage of.
-
Feb 18, 2008, 11:55 #2
- Join Date
- May 2003
- Location
- Washington, DC
- Posts
- 10,653
- Mentioned
- 4 Post(s)
- Tagged
- 0 Thread(s)
Well, you could just serve the file. But failing that, you can get it into the output stream by doing something like:
Code:string html=File.ReadAllText(Server.MapPath("~/Path/To/My/Html.htm")); Response.Write(html);
-
Feb 21, 2008, 21:52 #3
- Join Date
- Feb 2008
- Location
- Leesville, LA
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just use Server.Transfer instead of Response.Redirect and the url won't change.
Check out: http://www.mlmsuccess.net/sceptermt/
-
Feb 22, 2008, 07:41 #4
- Join Date
- May 2003
- Location
- Washington, DC
- Posts
- 10,653
- Mentioned
- 4 Post(s)
- Tagged
- 0 Thread(s)
That is what he is trying--but Server.Transfer does not work outside of the current application.
Bookmarks