Rank: Newbie Groups: Member
Joined: 7/3/2014 Posts: 2
|
Hi,
ASPXToPDF does not print any controls that are dynamically added to a placeholder. Is this by design? Or am I doing something wrong :).
Many thanks in advance, Eric
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
ASPXToPDF works in a transparent manner. So please try to comment out the call to RenderAsPDF and then see if you get the same result. For example, if you have an "Export to PDF" button and inside the button's Click handler you call ASPXToPDF's RenderAsPDF method, then try to remove or comment out that line (so now the handler is empty) and run your page again. If you click the button and see your dynamically added control on screen, then they should appear in the result PDF file once you put RenderAsPDF back. If you do not see any of your dynamically added controls, then you won't see it in your PDF file.
You can think ASPXToPDF as an "output redirector". Everything flow/code that runs when the redirector is off will run when the redirector is on. So the first thing you want to check is whether the problem happens when the "redirector" is off. Once you get everything working when it's off, you can just put the line back to turn the "redirector" on and you should get the same result as on the screen.
Hope this helps. Please feel free to let us know if there is anything else.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 7/3/2014 Posts: 2
|
Hi,
You're right. I forgot when having a post-back, you need to re-add the controls to the placeholder(s). It al works now
Thank you for your support.
|