info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



How to display line breaks contained in a SQL Server table in ASP.NET
by BF (Principal Consultant; Architecture; Engineering)
2015-06-28






Solution:

<asp:DataList...

<ItemTemplate>

<asp:Label ID="lblDescriptionLong" runat="server" cssclass="lblDescriptionLong" Text='<%# IIf(Eval("DescriptionLong") Is DBNull.Value, "", Eval("DescriptionLong")).Replace(vbCr, "").Replace(vbLf, vbCrLf).Replace(Environment.NewLine, "<br />")%>'></asp:Label>