ASP Line-breaks - \n?

前端 未结 5 839
太阳男子
太阳男子 2021-02-19 07:28

I have been searching for a way to insert linebreaks in my code for when I view my source. I am not looking for

Something like the PHP equiv t

5条回答
  •  清酒与你
    2021-02-19 07:54

    There's no way to do it inside a string. You will have to append vbCrLf like so:

    Response.Write "hello" & vbCrLf & "world"
    

    If you want to include it in the string, you could do a replace after like so:

    output = "hello\nworld"
    output = Replace(output, "\n", vbCrLf)
    Response.Write output
    

提交回复
热议问题