Welcome Guest Search | Active Topics | Sign In | Register

One page can only have one ASPXToPDF control. Options
Robert Thibault
Posted: Saturday, September 9, 2017 10:53:12 PM
Rank: Newbie
Groups: Member

Joined: 9/9/2017
Posts: 2
I'm trying to so something really basic, but seem to be having trouble. I have a functioning page, but I wanted all the pages on the site to have PrintToPDF functionality. It semed pretty simple, just move the control to the Site.Master page (this is an out of the box ASP.NET WebForms project with Visual Studio 2017. When I call the method, I get a page with the error: One page can only have one ASPXToPDF control. (pasted below).

When I examine the Page Source,I don't see any evidence of two instances. Sure this is a newbie question, but I'm at a loss.

Wade Hatler



<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">

<!-- Begin EO.Web ASPXToPDF ASPXToPDF1. -->

<!-- End EO.Web ASPXToPDF ASPXToPDF1. -->

<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">




One page can only have one ASPXToPDF control.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: One page can only have one ASPXToPDF control.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:



[Exception: One page can only have one ASPXToPDF control.]
EO.Internal.fl.aq() +546
EO.Web.Control.OnInit(EventArgs e) +46
System.Web.UI.Control.InitRecursive(Control namingContainer) +139
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489


eo_support
Posted: Monday, September 11, 2017 12:10:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We do not see any obvious problems based on what you provided. What you can try to do is to create a small separate project with the same master page structure and see if it works for you. If that works, then you can compare the two projects to see if you can find out what triggered the problem. Usually as soon as you find out what triggered the problem, it will make sense to you.

If you have reduced the test project to a minimum but the problem still occurs, you can send the test project to us and we will be happy to take a look. See here for more details on how to send the test project to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Robert Thibault
Posted: Monday, September 11, 2017 12:14:36 PM
Rank: Newbie
Groups: Member

Joined: 9/9/2017
Posts: 2
Thanks. It was a newbie mistake and I figured it out ten minutes later but couldn't cancel the post.

If you don't mind an unrelated question, what's the best way to pass information from the Page_Load method to the asynchronous AfterRender event? I can think of several ways to do it, but wonder if there is a best practice.

Thanks
eo_support
Posted: Monday, September 11, 2017 12:22:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We are not expert on this so we usually do not provide any advice on such questions. I believe you will be able to get more extensive and complete information on this if you search online.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.