Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户从下拉列表中选择时,我使用“GridView”绑定数据,我的问题是当用户在“评论”中输入太多单词时,“评论”列超出表格范围,谁能帮我解决它?
您可以创建一个 css 类以在固定长度后换行。
<style type="text/css"> .DisplayDesc { width:250px;word-break : break-all } </style>
在gridview中应用这个类
<asp:Label CssClass="DisplayDesc" ID="Label1" runat="server" Text='<%# Bind("TransText") %>'></asp:Label>
未经测试,但可能这可以帮助你。