Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,

I have a web application in which I used window.print() function for printing the report.

When I clicked on print button a new tab will open (url=chrome://print/).
I want that while the user does not print this report, the report must show, and when user prints the report or cancels the report, user is redirected to home page.

means, when the printing is done, the user will be redirected to home page.
Posted
Updated 3-Oct-11 23:18pm
v3
Comments
Dalek Dave 4-Oct-11 4:44am    
Edited for Grammar and Syntax

you can use "document.location.href" in javascript

keep coding
 
Share this answer
 
Comments
bkthebest 4-Oct-11 4:37am    
hi Dharmesh,
here, what is "href"?
and how do i use this code?
Try this one

string url = HttpContext.Current.Request.Url.AbsoluteUri;
// http://localhost:1302/TESTERS/Default6.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900