I don't know if I'm asking the question correctly so apologies if I am using the wrong terminology. I typically write my own servers, javascript, etc in vi. I've 开发者_开发百科been given a project to enhance a VB.Net / ASP.Net application and I'm having some troubles figuring out how to get the user control to render BEFORE the page finishes loading.
When I use normal browser as the viewer, everything works OK. When I try to use generate the page as a report, the report generator spits out the PDF while my JavaScript graph drawing stuff is still in it's initialize functions.
They are using EvoPDF as the PDF generator. It appears the page is being considered complete after the page is loaded but before the javascript is executed.
I admit I'm a bit lost when it comes to ASP.NET, but I know HTML/HTTP/JavaScript very well.
How can I force the page load to wait until my usercontrol finishes rendering, or otherwise solve my problem?
Thank you
When you use evopdf, the PdfConverter has a property called ConversionDelay. This by default is set to 0.
If the problem is due to the page rendering too quickly then setting this may solve your problem.
You cannot get VB.NET to render something before the page has loaded. It is a server side language and the page must load all of the way to get the response from the server.
However it sounds like you may just need something like the domready function in JQuery. Where the page loads and then you execute your javascript. Right now it seems you might just be executing your javascript as the page is loading and you may need to wait for the full response from the server to start your script.
But no ASP.NET cannot draw or do anything until the page is loaded unless you are going to use some sort ajax functionality to get data from the server.
精彩评论