How to print a page.aspx in C#?
Hello
I'm new at asp.net and C#.
I have a page called Information.aspx. On that page there is a button "Print".
If you click that button I want to send the information that is on the page to print it out.
Can anybody help me?

fadil197777 reputationPosted Oct 26, 2004, 5:12 AM EDT
this.Button1.Attributes.Add("onclick", "window.print();")where Button1 is the ID of the button so you should match it toyours Warning:- DO NOT type the code above in the click button event hope that helpsstudentcsharp9 reputationPosted Oct 28, 2004, 7:13 AM EDT
studentcsharp9 reputationPosted Oct 28, 2004, 6:12 PM EDT
fadil197777 reputationPosted Oct 29, 2004, 12:23 AM EDT
private void Page_Load(object sender, System.EventArgs e) { this.Button2.Attributes.Add("onclick", "window.print();"); }If you type in this in the pageload event, it will works fine as it works for me. I am sorry if i can not help about the other issuestudentcsharp9 reputationPosted Oct 29, 2004, 7:02 AM EDT