asp.ne去除html的函數(shù)代碼
更新時間:2009年05月15日 00:22:34 作者:
asp.net下去除html標簽的函數(shù)。
復制代碼 代碼如下:
/// <summary>
/// 過濾字符串中的html代碼
/// </summary>
/// <param name="Str"></param>
/// <returns>返回過濾之后的字符串</returns>
public static string LostHTML(string Str)
{
string Re_Str = "";
if (Str != null)
{
if (Str != string.Empty)
{
string Pattern = "<\\/*[^<>]*>";
Re_Str = Regex.Replace(Str, Pattern, "");
}
}
return (Re_Str.Replace("\\r\\n", "")).Replace("\\r", "");
}
相關文章
.net實現(xiàn)微信公眾賬號接口開發(fā)實例代碼
這篇文章主要介紹了.net實現(xiàn)微信公眾賬號接口開發(fā)實例代碼,有需要的朋友可以參考一下2013-12-12
asp.net Repeater 數(shù)據(jù)綁定的具體實現(xiàn)(圖文詳解)
此例子綁定的數(shù)據(jù)源為微軟在mssql2000中提供的Northwind數(shù)據(jù)庫中的表Categories。2013-07-07
使用asp.net改變網(wǎng)頁上圖片顏色比如灰色變彩色
要能在網(wǎng)站上改變圖片的顏色,比如灰色的變成彩色,彩色的變成灰色多好啊,下面是通過asp.net實現(xiàn)的,有需求的朋友可以參考下2014-08-08
ASP.NET?Core使用Swagger/OpenAPI規(guī)范
這篇文章介紹了ASP.NET?Core使用Swagger/OpenAPI規(guī)范的方法,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2022-04-04
this connector is disabled錯誤的解決方法
打開editor/filemanager/connectors/aspx/config.ascx修改CheckAuthentication()方法,返回true2008-11-11
ASP.NET實現(xiàn)單點登陸(SSO)適用于多種情況
這篇文章主要介紹了ASP.NET在不同情況下實現(xiàn)單點登陸(SSO)的方法,在同主域但不同子域之間實現(xiàn)單點登陸等等2014-09-09

