Reputation: 81
Suppose we have a web page in asp.net mvc and we have applied some style using css, now i want to print the entire web page or some part of the web page in the exact format in print dialog-box. Is there any way or API exist to print web page in ASP.NET MVC.
how can i achieve it.
Upvotes: 0
Views: 889
Reputation: 218798
This has nothing to do with ASP.NET MVC (which is server-side) and everything to do with CSS (which is client-side).
Take a look at the CSS Media Types available. Essentially what you want to do is create a separate style sheet (or separate rules in the same style sheet) which target the "Print" media type. The browser will then use that style sheet (or those style rules) when printing.
Upvotes: 1