Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to break line in textbox (asp.net)
Posted
Comments
Member 10627896 28-Feb-14 9:45am    
send your code
Member 10633193 28-Feb-14 9:55am    
in .aspx file

<tr>
<td class="tabletd">Description:</td>
<td class="tabletd">
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Width="211px"></td>
</tr>



in update query

Update ourwork set ow_name ='" + editque.Text + "',ow_image='" + Image1.ImageUrl + "',ow_desc1 ='" + TextBox2.Text + "',ow_desc ='" + TextBox1.Text + "' where id='" + id + "'"


in that no any error occured but in that textbox ,how can i break the line , <br> is not worked .
Member 10627896 28-Feb-14 10:11am    
you can add <br> tag after txtbox
bt not in txtbox in txtbox you want line brk use enterkey
JasonMacD 28-Feb-14 10:19am    
Use <textarea></textarea>

1 solution

Please see: http://en.wikipedia.org/wiki/Newline[^].

Note that new line character(s) work only for the values of edit control. For HTML elements, this is </br>.

—SA
 
Share this answer
 
Comments
Maciej Los 28-Feb-14 10:49am    
Short and to the point, a5!
Sergey Alexandrovich Kryukov 28-Feb-14 11:04am    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900