473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Regarding Print option in Dotnet

Hello every one,

Can any one help me how can i print values of my webpage with just a button in the webpage.
From http://www.developmentnow.com/g/8_0_...ork-aspnet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Jan 25 '06 #1
1 1177
Kumar,
Add this in the head portion of the web page:
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories= yes,menubar=yes,";
disp_setting+="scrollbars=no,width=1000, height=600, left=10, top=10";
var content_value = document.getElementById("print_content").innerHTML ;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>About Aaron</title>');
docprint.document.write('</head><body align="left" onLoad="self.print()"><center>');
docprint.document.write(content_value);
docprint.document.write('</center></body></html>');
docprint.document.close();
docprint.focus();
}
</script>
Then prechance that area that you want the option to print then
at

<td rowspan=2 id=print_content> BLah blab blah <td>

Add the link to print where you want it:
<a href="javascript:Clickheretoprint()">Print this area</a>

Hope this helps you out

Aaron

"kumar" <ku***@msn.com> wrote in message news:59**********************************@msnews.m icrosoft.com...
Hello every one,

Can any one help me how can i print values of my webpage with just a button in the webpage.


From http://www.developmentnow.com/g/8_0_...ork-aspnet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Jan 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Samuel | last post by:
I wrote a very simple httpmodule and tried to compile it with no success. This is my code: ============== Imports System Imports System.Web Imports Microsoft.VisualBasic NameSpace...
3
by: Pablo | last post by:
Folks, i need to send to the printer, an html document. How can i do this from winfroms?? thanks Pablo
16
by: | last post by:
Hi , We have a lot of code which runs fine under VC++ 6.0. We have to move to ..NET becasue one of the librairies uses .NET classes. Does every library(including those which do not use .NET...
1
by: anishsulakhe | last post by:
I am currently a MCA Students and doing my Industry project. I hav created a eCommerce Server on DOTnet in C# Language.The team membe were 6, in which my contribution was creating User management....
3
by: Sivaraman.S | last post by:
Hi, Is it possible to use Option Base in VB.NET. If so then how can i set the base to 0. In vb.net while we using array collections, it gives the error.
2
by: Dean R. Henderson | last post by:
For an ASP.NET web application, is there a way for one session (with appropriate security authorization) to set a HttpSessionState variable to point to another session and execute the Abandon...
4
by: Peter | last post by:
ASP.NET 1.1 Does anyone has an example where user can click on an link or button and print the current page? Thanks Peter
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
11
by: JWest46088 | last post by:
I'm having difficulty trying to figure out how to print a text file from a hash table one line at a time. I have the text file read into the hash table and can print the text file all at once, but I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.