手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >使用DataTable.Select 方法时,特殊字符的转义方法分享
使用DataTable.Select 方法时,特殊字符的转义方法分享
摘要:复制代码代码如下:publicstaticstringReplace(stringoldStr){if(string.IsNullOrEmp...

复制代码 代码如下:

public static string Replace(string oldStr)

{

if (string.IsNullOrEmpty(oldStr))

{

return "";

}

string str2 = Regex.Replace(oldStr, @"[[+|()^*""]'%~#-&]", delegate(Match match)

{

if (match.Value == "'")

{

return "''";

}

else

{

return "[" + match.Value + "]";

}

});

return str2;

}

【使用DataTable.Select 方法时,特殊字符的转义方法分享】相关文章:

记录asp.net网站是什么原因导致停止运行的代码

asp.net使用ODP即oracle连接方式的的防注入登录验证程序

asp.net 动态生成表格

ASP.NET 2.0中的页面输出缓存

Asp.Net下通过切换CSS换皮肤

asp.net页面防止重复提交示例

asp.net字符串分割函数使用方法分享

ASP.NET Session使用详解

用WebClient.UploadData方法上载文件数据的方法

asp.net 面试+笔试题目第1/2页

精品推荐
分类导航