Click here to Skip to main content
15,887,331 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have write javascript for print page.

function printpage()
{
window.print();
}


In onclientclick button property ,i have put function name printpage().
this is working in visual studio 2008,but not in visual studio 2010.
what is solution for that?
Posted
Comments
R. Giskard Reventlov 17-Jan-13 13:48pm    
Is this generating an exception? It should work: is there something else you're not telling us?
David_Wimbley 17-Jan-13 14:02pm    
What browser/s are you using? Does it work in one not the other? Are you getting javascript errors? Using jquery? Using any javascript library?

A simple "doesnt work" wont help you get the answers your looking for, try using the Improve Question widget to make the problem with your code more clear so that those willing to help can.

The function of the JavaScript in a Web application does not depend on Visual Studio in principle. An HTTP server never uses any kind of Visual Studio, not in any sense at all. The question just makes no sense. I do understand that you have some problem, but you need to obtain pure observations free from your (wrong or right) ideas on what's going on. And then you need to present those observation in objective manner.

—SA
 
Share this answer
 
C#
Response.Write("<script>window.print();</script>");
 
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