Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

robjose

[Resolvido] vbcrlf

Recommended Posts

Boa tarde!!!

 

tenho um codigo que me retorna registros do banco de dados, mais não estou conseguindo fazer a quebra de linha.....não sei onde colocar o vbcrlf, e como usa-lo....podem me ajudar

 

agradeço.

 

esse é o codigo.

 

Private Function Gera_Tarefa(ByVal Cod As Integer) As String
        Dim Corpo As String = vbNullString
        Dim Arquivo As String = "C:\" & Cod & ".html"
        Dim Tarefa As System.Data.DataTable
        Tarefa = RS("SELECT tarefa, assunto, ajuda  FROM vtt.tb_tarefas WHERE cod_tarefa = " & Cod)
        If Tarefa.Rows.Count > 0 Then
            Corpo = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />"
            Corpo = Corpo & "</head><br><body bgcolor=white text='#000000'>"
            Corpo = Corpo & "<a href='Ajuda.html'><img src='images_voltar.jpg' border='0'></a>"
            Corpo = Corpo & "<br><br>"
            Corpo = Corpo & "<b><font face=microsoft sans serif size=5 color='#608080'>"
            Corpo = Corpo & Tarefa.Rows(0).Item("assunto").ToString & "</font><br>"
            Corpo = Corpo & "<hr size=1 color='#608080'></hr>"
            Corpo = Corpo & "<font face=helvetica  size=2 color='#8B8B83'>"
            Corpo = Corpo & Tarefa.Rows(0).Item("tarefa").ToString & "</font><br><br>"
            Corpo = Corpo & "<hr size=1 color='#608080'></hr>"
            Corpo = Corpo & "<font face=helvetica  size=2 color='#8B8B83'>"
            Corpo = Corpo & Tarefa.Rows(0).Item("ajuda").ToString & "</font><br><br>"
            Corpo = Corpo & "<a href='Ajuda.html'><img src='images_voltar.jpg' border='0'></a>"
            Corpo = Corpo & "<p align=center><img src='logo_vtt_verysmall.gif'></p>"
            Corpo = Corpo & "</body></html>" & vbCrLf
        End If
        If IO.File.Exists(Arquivo) Then
            Kill(Arquivo)
        End If
        Dim oEscrever As System.IO.StreamWriter
        oEscrever = IO.File.CreateText(Arquivo)
        oEscrever.Write(Corpo)
        oEscrever.Close()
        Return Cod & ".html"
    End Function
End Class

Compartilhar este post


Link para o post
Compartilhar em outros sites

consegui.....

 

Corpo = Corpo & Replace(Tarefa.Rows(0).Item("ajuda").ToString, vbCrLf, "<br>") & "</font><br><br>"

 

foi só colocar o replace.....e pam....deu certo.

 

valeu a juda cara.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.