Associate
I am a c# noobie, and I am currently designing a demo site for a project, which has several elements to its design. One element in particular is causing me a lot of issues.
The aim of this element is the following - To resize a Div and its controls, while allowing the user to print a landscape version of the Div at Full size on a seperate page.
So far I have these steps-
1)Save the current layout of a Div(Ticket), and all of it's controls and the controls within those controls, which are lables, textboxes, images etc.. This is currently saved into a session["OrigTicket"] for later.
2)Resize the Layout of the Div(Ticket) to fit a certain ratio, this is to be seperate from the one saved into the session, so that we can alter it as required without the Div within the session being altered.
3)When a user clicks 'print' a new window is opened that has the origional scale for Div(Ticket) and is also rotated so that the user can print a 'Landscape' rendered page in the printer default layout of portrait.
Now the issue I am having is saving the origional (non resized) Div(Ticket) to the session in a way that means it is seperate from and is not affected by the resizing function. - At current I have to rescale the saved Div in the new window.
I have tried : - A Webbrowser Control used to take a snap shot(turned out to be very low rez and speccly, unusable as a Barcode was unreadable)
-Saving the Div(Ticket)'s controls in a control collection, (Just seems to reference the Div(Ticket)'s controls, and are scaled when we resize the unsaved Div, even though saved to a new ControlCollection)
- Clone properties of each control into a new control and then add new control to a control collection, which then gets saved into the session. (Issues with InnerHtml & InnerText, also has issues with Image/literal/textbox Controls).
For some reason I am not allowed to use Javascript (even though I have solved it using Javascript) and have been told that everything should be attempted via aspx pages on the server. I have looked into C# ActiveX controls that print in landscape.. but I have never had much luck with them mainly due to my brain having a spazout while programming them.
Any one here willing to help me out a bit? I'll provide a pack of cookies !!
If it helps any I am using .Net Framework 4, and it has to be Internet Explorer 8 Only. (No other browsers are allowed )
The aim of this element is the following - To resize a Div and its controls, while allowing the user to print a landscape version of the Div at Full size on a seperate page.
So far I have these steps-
1)Save the current layout of a Div(Ticket), and all of it's controls and the controls within those controls, which are lables, textboxes, images etc.. This is currently saved into a session["OrigTicket"] for later.
2)Resize the Layout of the Div(Ticket) to fit a certain ratio, this is to be seperate from the one saved into the session, so that we can alter it as required without the Div within the session being altered.
3)When a user clicks 'print' a new window is opened that has the origional scale for Div(Ticket) and is also rotated so that the user can print a 'Landscape' rendered page in the printer default layout of portrait.
Now the issue I am having is saving the origional (non resized) Div(Ticket) to the session in a way that means it is seperate from and is not affected by the resizing function. - At current I have to rescale the saved Div in the new window.
I have tried : - A Webbrowser Control used to take a snap shot(turned out to be very low rez and speccly, unusable as a Barcode was unreadable)
-Saving the Div(Ticket)'s controls in a control collection, (Just seems to reference the Div(Ticket)'s controls, and are scaled when we resize the unsaved Div, even though saved to a new ControlCollection)
- Clone properties of each control into a new control and then add new control to a control collection, which then gets saved into the session. (Issues with InnerHtml & InnerText, also has issues with Image/literal/textbox Controls).
For some reason I am not allowed to use Javascript (even though I have solved it using Javascript) and have been told that everything should be attempted via aspx pages on the server. I have looked into C# ActiveX controls that print in landscape.. but I have never had much luck with them mainly due to my brain having a spazout while programming them.
Any one here willing to help me out a bit? I'll provide a pack of cookies !!
If it helps any I am using .Net Framework 4, and it has to be Internet Explorer 8 Only. (No other browsers are allowed )
Last edited: