printing dilemma

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mirainc
    New Member
    • Jul 2008
    • 34

    printing dilemma

    Hey all.. In one of my webpage, ive created this letter.. How can i just print the letter and not the whole page? im using VB.NET language.. please help asap.. tks!
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    There was something awhile ago on this forum about using a panel. Suggest searching the site.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Use CSS2 to format how your page will be printed.
      See the W3C website for a reference on Print CSS2.

      -Frinny

      Comment

      • mirainc
        New Member
        • Jul 2008
        • 34

        #4
        Originally posted by Frinavale
        Use CSS2 to format how your page will be printed.
        See the W3C website for a reference on Print CSS2.

        -Frinny
        But first of all how can i get the letter to appear in a pop up window when a button is clicked?
        The letter contains variables..

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by mirainc
          But first of all how can i get the letter to appear in a pop up window when a button is clicked?
          The letter contains variables..
          Create an ASPX page that will display the letter for you...or use the same page you have only pass it a query string parameter to indicate that you just want the letter output.

          Then for the button add some JavaScript that will open that page in the browser....

          EG:

          [code=vbnet]
          myPrintButton.A ttributes.Add(" onclick","JavaS cript:window.op en(""" + "ThePrintPage.a spx""" + ",""""+"prinit" "" + ",""" + "toolbar=no,men ubar=no,width=8 50,height=500,r esizable=yes,sc rollbars=yes""" + ");return false;")[/code]

          The "return false" prevents the page from posting back to the server.

          -Frinny

          Comment

          Working...