hi all,
i'm new to .NET(C#), so i need some advice on making a printer friendly page. let me explain my situation.
I have a couple of pagelayouts(aspx) which are based on a masterpage which has a layout.css style sheet(<link href="/_layouts/layout.css" rel="stylesheet" />). Now on all the pagelayout i have a little imagebutton(print) when pressed will open another page which is a printer friendly one.
Now i have a print.css which hides all the unnecesarry stuff of the page. This print.css will be in the masterpage too, so all pagelayout automatically use this.
What i want to achieve is the following. When clicking the imagebutton, the same page needs to open, but only with the print.css activated.
I heard that its possible to when clicking the imagebutton to sent a querystring in the url forexample marketsector.aspx?print=true. Now in the masterpage i need to built some kind of control to read this querystring and if print=true to use the print.css and if not to use the normal layout.css .
So i have the idea of how this all will need to work, but not so much how to implement it all... i need to knwo the following:
- When pressing the imagebutton how can i automaticcaly add "?print=true" to my url?
- And how do i retrieve this querystring from the masterpage?
- and now some kinda if else loop in de materpage to choose from the 2 styles?
I have 20 pagelayouts all based on this masterpage and all will have a imagebutton for a printerfriendly page using the print.css. So its obvious to built the control in the masterpage rather then in all the pagelayouts right?
any help and or links to similar topics are welcome !