replace spaces with   from a recordset

南笙酒味 提交于 2019-12-05 18:48:37

In Classic ASP you will need to code the following:

<%= Replace(rsTmp("Name")," ","&nbsp;") %>

Which is the same as

<%
    Response.Write ( Replace(rsTmp("Name")," ","&nbsp;") )
%>

Actually, I would suggest using replace(rsTmp("Name"), " ", "&#160;")

In HTML5 the ASCII code &nbsp; are replaced with &#160;. You might as well do this from this day and onwards ;)

zerey

I resolved it! I used replace function like this.

<% Replace(rsTmp("Name")," ","&nbsp;")%>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!