Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 17-Jan-13 7:45am
Comments
mark merrens at 17-Jan-13 13:48pm
   
Is this generating an exception? It should work: is there something else you're not telling us?
David_Wimbley at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Response.Write("<script>window.print();</script>");
  Permalink  

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

  Print Answers RSS
0 Maciej Los 235
1 OriginalGriff 215
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,395
1 Sergey Alexandrovich Kryukov 6,163
2 Maciej Los 3,754
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100