TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mukesh Kumar Tiwari
NA
980
250.6k
How to print the value of text box in asp.net.
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
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];
DropDownList1.Items.Add(InstalledPrinters);
//=========
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)
{
//prd.Print();
}
else
{
Label1.Text = "invalid printer name";
}
Thanks & Regards
Mukesh Tiwari
Reply
Answers (
1
)
How to print the data through selected printer in asp.net.
Page printing :