How can I make a TextBox control that is multiline not be resizable?
I am using asp.net with c# and I can't find an option to do this
You should be able to disable textarea resizing in Chrome and Safari with this css:
textarea {
resize: none;
}
Not preferred code, but this worked for me. This style overwrites the css
<asp:TextBox id="tb5" TextMode="multiline" style="resize:none" width="330px" Height="50px" wrap="true" runat="server" />
I am using the following method and it works most on most of them;
.mymultitextboxclass{max-height:100px;min-height: 100px;max-width:400px;min-width:400px;}
then set this css class to your MultiLine Textbox. see it : http://jsfiddle.net/tugberk/RKcbn/
I was think
:s but I meant I was thinking
:=)
There is no such option on the control.
This completely depends on the browser and how it renders textboxes.
You can control this via the CSS resize
property, though this is browser dependent.
Create a CSS class as follows:
.MultiLineTextBox
{
resize: none;
}
Then in the code of textbox,
<asp:TextBox ID="txtAdd" runat="server" TextMode="MultiLine" BorderStyle="Inset"
CssClass="MultiLineTextBox"></asp:TextBox>