passing formatted text from one textbox to another

Experts:

I'm passing the text from one textbox, to a textbox on a usercontrol I've created. if the original text is formatted in anyway, once I pass it to the user control I lose the formatting and receive only the text. What's the best way for me to pass the formatted text from one control to another?

here's a snippet of my  code:

textbox txtnotes = (textbox)myctrl.FindControl("txtRecievingNotes")

txtnotes.Text = txtPassingNotes.Text

Thanks in advance for the help,
telliot79Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
How is the formatting done?  Are you setting styles?
0
David Johnson, CD, MVPOwnerCommented:
Text boxes don't contain formatting. Rich Text Boxes do..
0
telliot79Author Commented:
Sorry, I should have been clearer - I'm talking about line breaks, bullet points, tabs, etc.

when I populate the text from one control to the other, it just comes through as one long string of text and ignores the tabs and line breaks I've created.
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Kyle AbrahamsSenior .Net DeveloperCommented:
How are you creating the tabs / bullet points / etc?

The textbox won't support this by default so what kind of control are you using?  And confirm this is asp.Net?
0
telliot79Author Commented:
I'm just copy and pasting from word into the text box. it's asp.net and just an asp.net textbox control. the spacing is really the problem.
0
telliot79Author Commented:
this seems to have solved my main problem:

txtnotes.Text = txtPassingNotes.Text.Replace(Environment.NewLine, "<br />");
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
telliot79Author Commented:
Thanks Kyle. your answers helped me understand my problem and find a solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.