asp.net textarea换行函数代码

Irma ·
更新时间:2024-09-20
· 699 次阅读

代码如下:
/// <summary>
/// 替换html中的特殊字符
/// </summary>
/// <param name="theString">需要进行替换的文本。</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;
}



net textarea换行 ASP.NET 函数 textarea ASP

需要 登录 后方可回复, 如果你还没有账号请 注册新账号