Results 1 to 3 of 3

Thread: Print In ASP.NET

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Posts
    19

    Print In ASP.NET

    Ok... In ASP.NET, I need to beable to print anything thats in a Textbox. It would be great if you could give me the EXACT code. Meaning, all I would have to do, is copy paste it, and then make the Textbox and re-name it and maybe do a couple of more simple things. Basically so that your average retard(me for example) can beable to print using the code.

    P.S. I have searched through the forums for print and didnt find what I was looking for.

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    I think you'll need to use Crystal Reports to print. Search for threads or articles on that and you may find what you need.

    Otherwise it would be quite a job for the mentally handicapped.

  3. #3
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You would need to use javascript to invoke the browser's print dialog.

    Code:
    <script language="JavaScript">
    function PrintGo(myTextAreaName)
    {
    if (window.print) {
      text = document.form[0].myTextAreaName.value;
      winId = window.open('','newwin');
      with (winId.document) {
        write('<body onLoad="window.focus();window.print()"><pre>'+text+'</pre><\/body>');
        close();
      }
    }
    }
    </script>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width