加入收藏 | 设为首页 | 会员中心 | 我要投稿 焦作站长网 (https://www.0391zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

asp.net textarea换行函数代码

发布时间:2020-03-21 04:48:35 所属栏目:Asp教程 来源:互联网
导读:asp.net textarea换行函数,注意就是替换html中的特殊字符


/// <summary>
/// 替换html中的特殊字符
/// </summary>
/// <param>需要进行替换的文本。</param>
/// <returns>替换完的文本。</returns>
public string HtmlEncode(string theString)
{
theString=theString.Replace(">", ">");
theString=theString.Replace("<", "<");
theString=theString.Replace(" ", "  ");
theString=theString.Replace(""", """);
theString=theString.Replace("'", "'");
theString=theString.Replace("n", "<br/> ");
return theString;
}

(编辑:焦作站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读