Author: cecook05 | Posted on: 1/3/2009 6:02:54 PM | Views : 323

I have a simple multiline textbox in an updatepanel.  When I click on my command button the text from the textbox is sent to my data access class as input to a stored procedure.  Latter I try to view the value from the database like so:
 <asp:Label ID="ltContent" Text='<%#Eval("Content").ToString().Replace(Environment.NewLine, "<br />") %>' runat="server"></asp:Label>
The problem is that Replace(Environment.NewLine, "<br />") is not working - I get one long line of text without the breaks.  If I copy the field directly from the database using SQL Server Management Studio and paste it into a text editor, I can see that the line breaks are there.  Now, if I get rid of the UpdatePanel and use the same code to send the multiline text to the stored procedure, everything works as expected when I display it (I get like breaks).  What could be causing this?
Go to the complete details ...