c# - asp.net scrollbars on empty textbox -
i have textbox follows:
<asp:textbox id="textbox1" runat="server" width="100px" rows="3" readonly="true" borderstyle="none" borderwidth="0" textmode="multiline" text='<%# eval("notes") %>' backcolor="#222222" forecolor="white"></asp:textbox>
how can make vertical scrollbar not displayed when textbox either empty or doesn't need scroll because text fits in 3 lines?
you can css specifying overflow:auto;
. can manually add attribute cssstylecollection
@ textbox1.style
in page's code-behind, or can apply cssclass
value declaratively , define css class in external stylesheet.
here documentation on css overflow
: http://www.quirksmode.org/css/overflow.html
here documentation on textbox.style
property: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.style
Comments
Post a Comment