ASP.NET's multi-line text box (TextBox) increases with the increase in content, and does not display the implementation of

xiaoxiao2021-03-06  19

I have recently been a project, showing news content in a multi-line text box (TextBox), because the content is much less, and there is always a vertical scroll bar, it is very unrestrained, the author wants to use a magazine, remove the vertical scroll bar, And the height of the text box becomes large as the content increases, and the high degree of adaptation content is increased.

Method 1: For English, you can use a Label control to achieve display, as it increases with the increase in content.

Method 2: It is the multi-line text box method used.

Part of the code is as follows: (this article uses a table positioning, Textbox is placed in a cell)

...........

.....

Key sentences are: style = "overflow-y: Visible (in the red display section), need to be added manually in the .aspx page.

If you have a better way, please enlighten me! thanks for sharing!

转载请注明原文地址:https://www.9cbs.com/read-40263.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.033, SQL: 9