asp:TextBox multiline只读下 滚动条是不能拖动的
要看不在当前屏幕的内容用鼠标在文本框中向下拖动也是看到内容 但比较麻烦 按照自动比例展开
<tr hight="25px">
<td width="15px">
</td>
<td style="width: 100px">
<asp:Label ID="LabelDescriptionTitle" runat="server" CssClass="TitleLabel" Width="90px">备注</asp:Label>
</td>
<td colspan="3" align="left" valign="bottom">
<asp:TextBox ID="TextBoxDescription" runat="server" Enabled="false" TextMode="MultiLine"
MaxLength="500" Width="550" CssClass="TextBox" Height="80px"></asp:TextBox>
<asp:Label ID="lblMaxWords" Visible="false" runat="server">不得超过500字</asp:Label>
</td>
<td width="120">
</td>
<td>
</td>
</tr>去掉tr的高度 和textbox高度调整为100%
<tr>
<td width="15px">
</td>
<td style="width: 100px">
<asp:Label ID="LabelDescriptionTitle" runat="server" CssClass="TitleLabel" Width="90px">备注</asp:Label>
</td>
<td colspan="3" align="left" valign="bottom">
<asp:TextBox ID="TextBoxDescription" runat="server" Enabled="false" TextMode="MultiLine"
MaxLength="500" Width="550" CssClass="TextBox" Height="100%"></asp:TextBox>
<asp:Label ID="lblMaxWords" Visible="false" runat="server">不得超过500字</asp:Label>
</td>
<td width="120">
</td>
<td>
</td>
</tr>
在ASP.NET中,当使用asp:TextBox的multiline属性设置为只读时,滚动条无法拖动查看文本框内超出屏幕的内容。用户需要通过鼠标在文本框内向下滚动来查看,这带来了不便。解决方法是根据文本内容自动调整TextBox的高度。
4004

被折叠的 条评论
为什么被折叠?



