Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
txtOption1.Rtf =dtQtnRow.Rows[0].Field<String>("Qtn_Option_1").ToString();


not working,txtOption1 is my rich textbox
Posted
Comments
Kornfeld Eliyahu Peter 12-Jan-15 2:55am    
And the content of the data-field IS RTF?
Member 9399007 12-Jan-15 4:35am    
I stored the data using below code

objPhyvo.Option1 = txtOption1.Rtf.Trim();

so that the text is saved along with the formatting but im facing problem while displaying it,I use SQL server at backend with datatype 'tex
Sinisa Hajnal 12-Jan-15 6:01am    
Did you check the field value? Did it save properly? Also, try saving without TRIM which maybe cuts off some unseen character?

1 solution

Avoid Trim() Just save like this objPhyvo.Option1 = txtOption1.Rtf;
 
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