Asp.Net中文本换行

   private String HtmlCode(string str)
    {
        if (str!= null)
        {
            str= str.Replace("\r", "<br>");
            str= str.Replace(" ", "&nbsp;");
            return str;
        }
        else
        {
            return "";
        }
    }
posted @ 2010-05-02 17:16 星际 阅读(48) 评论(0) 编辑 收藏