Hi dharmendr,
It looks interesting, but the solution you give implies that the file must be saved somewhere. In my case, the file is not saved anywhere except in the cache memory of the browser. With this I mean that when I click 'generate', it will create a *.tmp file, let's say, one like this A9R1gpy1nq_wx1dqb_5fw.tmp
That file I see is created in this path in the computer ~\AppData\Local\Temp\acrord32_sbx
That is the tmp file with the pdf content that the 'generate' button created (SQL). So, I don't think it is saved anywhere, including the server, except the user's computer, in this case, my computer (developer).
When I run the program and click 'generate', if I have this enabled: Response.AddHeader("Content-Disposition", "attachment; filename=" + reportLabel + "_JEA.pdf"); - then will prompt the user to Open, Save or Cancel. If I disable it and use only Response.BinaryWrite(bytes); - it will show the pdf content in the browser and making the original page disappear. If I run the application using Response.BinaryWrite(bytes) it will create the *.tmp file and once U close the browser the *.tmp file dissapears, which is fine, it is what I am looking.
I would like to know how to send Response.BinaryWrite(bytes) to the ltEmbed.Text = string.Format(embed,...) so I know it will display the content in the embed viewer and not the browser. Once that happens, then the user will choose if saving or not the file, then the *.tmp will disappear.