Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one multiline textbox. i am inserting textbox data into database. It is working fine, but when i get data from database there is no line breaks.. Actually what i want is insert linebreak tag () where i press enter in multiline textbox on click of the button..
Posted

1 solution

See Not Showing Text Which I Enter In Textarea In Same Format In Div Or Span Tag[^]

You should have a text area like in the next example:
C#
<textarea name="Comments" id="Comments" style="width: 100%;" rows="5" cols="20">



In the ASP.NET the web page should have the next second example:
C#
<asp:TextBox runat="server" ID="Comments" EnableViewState="true" width="100%" TextMode="MultiLine"></asp:TextBox>
 
Share this answer
 
v4
Comments
VICK 18-Mar-14 2:30am    
I Think OP is not using MVC, same like the OP of the given Link... :(
Raul Iloc 18-Mar-14 2:54am    
In the link there is also a HTML example, so I updated also here.
Why did you vote with 1, because my solution is working in real site?
VICK 18-Mar-14 3:16am    
""In the link there is also a HTML example,""

Can you guide me to that?? As I am unable to get this from the link. Reason might be the less knowledge.

and reason of Downvote is "Sharing a link which is UN-SOLVED and hence giving a bad impression.(in my opinion)".

Didnt mean to hurt you Raul :(

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