I received a request to modify a text to keep a line breaks previously entered in textbox. I tried several different methods to accomplish this task. The best solution is
<asp:Label ID="commentLabel" runat="server" Text='<%# Eval("comment").ToString().Replace(vbCRLF, "<br/>") %>' Wrap="true" />
It works very well. Thanks Forums.asp.net for quick and very elegant solution. My coworker have already whispered "Alla, Good Job!" It makes my day!
No comments:
Post a Comment