Mukesh Kumar Tiwari

Mukesh Kumar Tiwari

  • 1.2k
  • 1k
  • 208.1k

How to print the value of text box in

Oct 11 2013 7:37 AM
hi friends..

i ant to print the text of Multiline Textbox trough the printer when client click on print button.
I m using following code for that..

this is for bind the all printer of network in a dropdown
 String InstalledPrinters;
        for (int count = 0; count < PrinterSettings.InstalledPrinters.Count; count++)
            InstalledPrinters = PrinterSettings.InstalledPrinters[count];

And this is for printing.......

 // prd.DocumentName = TextBox1.Text;


        prd.PrinterSettings.PrintFileName = "D://pd.txt";//here i want to print the valu of textbox
        prd.PrinterSettings.PrinterName = DropDownList1.Text;

        if (prd.PrinterSettings.IsValid)

            Label1.Text = "invalid printer name";

Thanks & Regards
Mukesh Tiwari

Answers (1)