473,395 Members | 2,795 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,395 software developers and data experts.

[Newbee] Print .aspx page...

Hi!

I'm a new bee in asp.net. I have a page that includes a table and a repeater
web control, they have been filled dynamically with a stored procedure. So I
would like to print this page with a print button. When I click the print
button, a new window must be opened and window.print() dialog box must be
appear. But how can I do this? I have no idea. Please help.

Best Regards,
Ares
Nov 18 '05 #1
4 1884
use the client side javascript funciton

window.print();

http://msdn.microsoft.com/library/de...hods/print.asp

cheers,
mortb

"ares" <aresATasia-minor.info> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
Hi!

I'm a new bee in asp.net. I have a page that includes a table and a
repeater web control, they have been filled dynamically with a stored
procedure. So I would like to print this page with a print button. When I
click the print button, a new window must be opened and window.print()
dialog box must be appear. But how can I do this? I have no idea. Please
help.

Best Regards,
Ares

Nov 18 '05 #2
In the onclick of that button, use client side code(window.opent) to open a
new window with the page you want to print. In the on_load of the page, just
call window.print() javascript method.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"ares" <aresATasia-minor.info> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
Hi!

I'm a new bee in asp.net. I have a page that includes a table and a repeater web control, they have been filled dynamically with a stored procedure. So I would like to print this page with a print button. When I click the print
button, a new window must be opened and window.print() dialog box must be
appear. But how can I do this? I have no idea. Please help.

Best Regards,
Ares

Nov 18 '05 #3
Thank you, but I know how I can open new window with js.the Problem is I
don't know how can I transfer my dynamic content - which is formed in a
repeater web control- to another page (opened in new window) and print it.
"Saravana" <sa******@sct.co.in> wrote in message
news:%m*****************@news.cpqcorp.net...
In the onclick of that button, use client side code(window.opent) to open
a
new window with the page you want to print. In the on_load of the page,
just
call window.print() javascript method.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"ares" <aresATasia-minor.info> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
Hi!

I'm a new bee in asp.net. I have a page that includes a table and a

repeater
web control, they have been filled dynamically with a stored procedure.
So

I
would like to print this page with a print button. When I click the print
button, a new window must be opened and window.print() dialog box must be
appear. But how can I do this? I have no idea. Please help.

Best Regards,
Ares


Nov 18 '05 #4

I write a java script function, and took my dynamic content into a div. Then
with my js function opened a new window and took div's content into the new
page. So it works!
Thanks for your help.

Ares

"ares" <aresATasia-minor.info> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Thank you, but I know how I can open new window with js.the Problem is I
don't know how can I transfer my dynamic content - which is formed in a
repeater web control- to another page (opened in new window) and print
it.
"Saravana" <sa******@sct.co.in> wrote in message
news:%m*****************@news.cpqcorp.net...
In the onclick of that button, use client side code(window.opent) to open
a
new window with the page you want to print. In the on_load of the page,
just
call window.print() javascript method.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"ares" <aresATasia-minor.info> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
Hi!

I'm a new bee in asp.net. I have a page that includes a table and a

repeater
web control, they have been filled dynamically with a stored procedure.
So

I
would like to print this page with a print button. When I click the
print
button, a new window must be opened and window.print() dialog box must
be
appear. But how can I do this? I have no idea. Please help.

Best Regards,
Ares



Nov 18 '05 #5

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

Similar topics

9
by: EMW | last post by:
I have created a page in aspx and after a click on a button, a new page should open. How is this possible? I tried it doing it like in vb.NET with opening a new form, but it doesn't work. rg,...
8
by: EMW | last post by:
I have created a page in aspx and after a click on a button, a new page should open. How is this possible? I tried it doing it like in vb.NET with opening a new form, but it doesn't work. rg,...
16
by: EMW | last post by:
I have created a page in aspx and after a click on a button, a new page should open. How is this possible? I tried it doing it like in vb.NET with opening a new form, but it doesn't work. rg,...
0
by: Martin Arvidsson, Visual Systems AB | last post by:
Hi! I have a couple of newbee questions. I have a .aspx page with a couple of TextBoxes and a submit button. Now... When i press the submitbutton i want the data in the TextBoxes to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.