Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Dear Sir,

I need About print the particular c# function in asp.net, when I click Button control

How to get please give me code

By mohan.
Posted
Updated 20-Jan-12 5:04am
v2
Comments
Prasad_Kulkarni 20-Jan-12 8:14am    
Give some more explanation mohankumar
Sanjay K. Gupta 20-Jan-12 8:14am    
What do you want to print C# Function or Any Control or Whole Page
Pro Idiot 20-Jan-12 8:24am    
"print the particular c# function in asp.net, "

What do you mean by print ??
BobJanova 20-Jan-12 10:09am    
I don't understand why you'd want to do this, please explain more about what you're trying to do.

1 solution

Your question is quite poorly phrased so hard to interpret. However, I'll have a crack.

Perhaps what you need is the javascript function:

JavaScript
window.print();


Attach to a button on a page and you can print that page. If you need to limit what the users can print you can use a specific css file as:

HTML
<link rel="Stylesheet" href="Styles/Screen.css" media="screen" />
<link rel="Stylesheet" href="Styles/Print.css" media="print" />


Only elements specified in the Print.css file will be printed.
 
Share this answer
 
Comments
fjdiewornncalwe 20-Jan-12 11:15am    
+5. I couldn't make heads or tails out of the question until I read your 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