[ASP.NET] – Zeilenumbruch im Gridview – Eval / Bind

Wieder was gelernt 😉

EIch habe im Gridview einen Zeilenumbruch erzeugt mit

[vbnet]
<%#Replace(Eval("keywords"), vbNewLine, "
“)%>
[/vbnet]

Wenn aber das Feld leer ist, kommt eine DBNull Exception. Richt ist es so:

[vbnet]
<%#Eval("keywords").ToString().Replace(vnNewLine, "
“)%>
[/vbnet]

Hoffe das hilft 😉

It's only fair to share...Flattr the authorShare on FacebookTweet about this on TwitterShare on LinkedInEmail this to someone

Related Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.