Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I have multiline text box in design view,where the user will enter some description.I have button for export which will export this multiline text box data into excel.In excel,the data from multiline textbox is a single line insted of Multiline.So I want to break single line into multiline.Please help me with code??
Posted
Updated 4-Jun-12 20:00pm
v2
Comments
Sergey Alexandrovich Kryukov 5-Jun-12 0:43am    
First, what's the problem? What have you done so far? Second, it needs a bit more detailed and clear description.
--SA
Wild-Programmer 5-Jun-12 0:55am    
Your question is not clear enough to be answered. In ASP.NET <br/> tag is used to break line. Is that what you are looking for?
In text box line break character would be '\n'. So if you wish to translate that to webpage, you will need to replace the \n character to <br/> tag example: Text.Replace("\n", "<br />");
sagar wasule 5-Jun-12 0:59am    
Question is not clear but In case of string use \n

1 solution

Try Like this
EX:
VB
   Dim str1s String = "Hello_hi_" 'or txtmul.text

Dim str  As String()
              str = str1 .Split("_")
 
Share this answer
 
Comments
Mukunda Raj 5-Jun-12 1:35am    
Can we split text on 'Enter'??
vangapally Naveen Kumar 5-Jun-12 1:50am    
For This You have to find Enter Key
if user press enter means you can split the string other wise not
see this link for identifying keys
http://stackoverflow.com/questions/1453896/how-to-identify-the-keyboard-keys-using-c-sharp

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