Last post Aug 08, 2018 08:12 PM by mgebhard
Aug 08, 2018 06:28 PM|inkaln|LINK
This should be simple but I can't get it to work. I have an aspx page from where it's redirecting user to another aspx page with an encrypted file path. In the page, I'm getting the filepath, which is a path to an .html file which I want to load on this
aspx page. I can load this file into an iframe and it loads fine. However, I don't want to set the iframe src just so that it's not shown in the page source where the file is. So I'm trying to use streamreader to read and display html in an asp literal
control....but it always says the file not found error....any ideas on why? The path to the file is correct and it works on iframe src and even if I go directly to the path but not when I try to load the html file by reading it and writing it.
Aug 08, 2018 06:33 PM|mgebhard|LINK
Why don't you follow the advice on in your other post?
Using a handler solves this problem and is the standard method for doing this sort of thing.
Aug 08, 2018 08:09 PM|inkaln|LINK
I have the file in app_date folder....and have a handler for it and passing the file name from an aspx page to the ashx handler. It is downloading the file instead of rendering the html within the calling aspx page. How do I have the html displayed instead
of downloding the file?
Aug 08, 2018 08:12 PM|mgebhard|LINK
Assign the handler url to the iframe source attribute.