Click here to Skip to main content
15,610,588 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I create one application in that two multi line textboxes(name input and output) and one button. now user type 'abc and pqr' in input textbox(user input) after clicking on submit button output textbox(Output) displays input textboxes in output textbox.
output is displays in output textbox like following format
CHill60 5-Jan-15 6:08am    
So that's what your program does. What is your question?
Member 11270220 5-Jan-15 6:22am    
if suppose user give multi line input then output should be multi line
Pradip R 5-Jan-15 6:30am    
As per your question , you are asking you want code for replacing 'and' word with line break. Is this what you want? Or when any user press enter on first textbox it should be reflected with the same enter in output textbox?
Member 11270220 5-Jan-15 6:34am    
hey listen first I create application with two textboxes one name input and second output and one button name submit.....set TextMode="Multiline" for both I run that I type in input textbox is abc
and click on submit....after clicked on submit I want output in output textbox is
Praveen Kumar Upadhyay 5-Jan-15 6:54am    
Very simple.
Textbox2.Text = Textbox1.Text

Try this-
txtInput.Text += txtOutput.Text+"\n";

txtInput.Text += txtOutput.Text+"\r\n";

I feel, your question should be "how to add line break in ASP.Net textbox?"

Hope, it helps :)
Share this answer
I would go though a youtube tutorial and get a good intro book on this. I don't see any info on where you are trying to do this. There should be a function where your code is run. Which function are you using? Page_Load? Button_Click? If you see nothing, then your code is not being executed and a method/function/event handler must be used. If you are only seeing some text and not all, then a setting in your page tags is not set right.

Happy Coding?
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