Problem description: a form on a webpage. If you want to print it directly, the style of some controls cannot be printed directly, which is not easy to see, such as Textbox, in particular, if textbox is multi-row, there will be a scroll bar, then the same content and layout will be displayed on another web page, but the control format should be set to print beautiful, as shown below
1. if the displayed content is formatted, for example, the message content is input using Textbox, which will include the carriage return, line feed, and other formats, it is best to use textbox for display when displayed, however, the attribute is set:
Textmode= "Multiline" Style="Border: 0px;Overflow-y:Visible" Readonly= "True"
Textmode= "Multiline"This sentence is required, otherwise the text will not be displayed with a line break.
Style="Overflow-y:Visible"This is becauseTextmode= "Multiline"A scroll bar is displayed to remove the scroll bar.
2. if the displayed content has no format, for example, it is only used to display a title, then use label. The advantage of label is that it will automatically wrap when the text is too long, it will not be cut off during printing. However, this is also because of this problem. Sometimes, for the sake of appearance, the label is forced to not wrap. Of course, the page looks nice, but it is not practical to print it, if the line feed is not entered, it will be overwritten if it is too long, and will be cut off during printing. Therefore, you need to set the properties of the control based on actual usage.