Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every one,
In my project I have created a Registration page . When the user fills his application and click submit button I need to redirect to 2 different pages at the same time first is Printing page that i am doing like this

C#
ClientScript.RegisterStartupScript(this.Page.GetType(), "", "window.open('" + print_page + "','_blank');", true);


and for another page I am doing like this
C#
Responce.Redirect("homepage.aspx");



but the problem is the first page "print_page " is not opening in new tab It is redirecting to "homepage.aspx ". So how can i do this two process at same page
1.Open a new tab in browser and go to printing page.
2.Responce.Redict to home page


Thanks in advance
Arun R.V
Posted

you may try this


C#
ClientScript.RegisterStartupScript(this.Page.GetType(), "", "window.open('printpage.aspx','_blank');window.location.href='homepage.aspx'", true); 


Thanks
 
Share this answer
 
Comments
[no name] 25-Oct-12 6:32am    
my 5
Hi,
After successful registration, you can redirect the user to a page where, you show the details in a non-editable mode (may be just Labels would help you). Along with showing these details, you can also give two buttons 'Print' and 'Continue'.
If the user clicks Print use window.open to open Print page. And if the User clicks Continue open homepage.aspx
 
Share this answer
 
Comments
arunrv 25-Oct-12 6:18am    
But after print page i should go back to Home page its self know . So I am giving him both option one which redirects to home page another one opens printing page in new tab.And thanks for your suggestion but i want to get both process under same button click....

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