Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,
I have a problem with the textbox, I want the user to write an article and then click add.
the thing is the article is showing as a long line, no return to the line. I dont knw what is the problem.

XML
<asp:TextBox ID="TextNews" runat="server" Height="350px"
                    TextMode="MultiLine" Width="100%" Wrap="False"></asp:TextBox>
Posted

Look here[^]

Alternatively you might want to look into a rich text editor for ASP.Net.

Hope this helps.
 
Share this answer
 
Comments
ZurdoDev 16-May-14 16:35pm    
All you need is myTextBox.TextMode = TextBoxMode.MultiLine. Seems easier to give the proper code than to link to it. :)
V. 17-May-14 1:36am    
This comment (and the ones below) do not really aid in anything ?
try it onces
<asp:TextBox id="TextArea1" TextMode="multiline" Columns="50" Rows="5" runat="server" />
 
Share this answer
 
v3
You need to look at rich textbox control or something like HTMLEditorExtender from the AjaxToolKit.
 
Share this answer
 
Comments
ZurdoDev 16-May-14 16:34pm    
Rich textbox is not in asp.net. AjaxToolKit of course is.
A multi-line TextBox control allows users to type information into a box that supports word wrap and vertical and horizontal scrolling. But it will give you as a string only.

If you are using Editor(Ajax Editor, Freetextbox Edit etc.) then it will return you HTML string which will contain you break statement in that details string. So you Edit you will get helpfull for your Article.
 
Share this answer
 

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