Hi, I have this code in my aspx page;
<a href="javascript:void(0);" onclick=<% Print(); %> title="Print listings">Print</a>
which presents a link to print a listings to a pdf when the user clicks on it; as you can note the script calls a function from the behind code.
The problem is that when I coded this it happens that when I go this page it prints to pdf when is loading, I thought it would wait for a click but instead it performs the printing.
What is the problem? thanks in advance.
PD. I'm working with VS2005 and for the pdf creation I use iTextSharp.