I'm using an ASP textbox as a textarea, which I recognize is rendered as an html input with type=text. It has thusfar served its intended purpose, with the exception that I cannot get the to wrap or start at the top.
Here is my html:
<asp:textbox id="Message_Box" form="Feedback_Form" CssClass="Contact_Input" maxlength="1200" lines="10" cols="10" wrap="true" mode="multiline" runat="server"/>
and my css:
#Main_Box_Left form textarea, #Main_Box_Left form .Contact_Input {
margin:0;
padding:5px;
height:228px;
width:453px;
max-width:455px;
max-height:230px;
min-height:230px;
font-size:13px;
line-height:20px;
color:rgb(63,69,73);
font-family:Arapey;
font-weight:lighter;
min-width:455px;
margin-top:10px;
background-color:#fcfcfc;
border:1px solid #a9a9a9;
border-top:1px solid #191919;
border-left:1px solid #191919;
}
The "lines", "cols" and "wrap" tags in the asp component seemingly do nothing.
If there is alternative tag I should be using as a text area please advise. If there is a way to wrap the text/make it start at the top, that would be fantastic as well.
MaxLength
is ignored whenTextMode="MultiLine"
. It should also beRows
instead oflines
andColumns
instead ofcols
. I am actually shocked that your textarea rendered anywhere close to what you showed in the screenshot with your original attribute names on your ASP.NET TextBox control. – Karl Anderson Jul 24 '13 at 1:25