最好用存储过程,不直接用SQL
解决方案 »
- 请问 C#里的xslt文件能引用外部的CSS文件吗?
- 【求教】bin\Debug文件夹下的可执行文件和打包之后的效果一样么?
- (bool)(this.textBoxName.Tag)
- vs2008调试小问题.
- 关于dotnetCHARTING_WinForms的常识
- 关于Lucene.Net学习的事
- 这段程序错在哪里了?
- 关于自动识别图像上的数字技术,并且显示出来,有什么好的建议?
- wpf中自定义控件 集合类型的依赖属性
- 如果调用其他Form里的控件?
- 很多次都没解决动态生成的DropDownList控件,SelectItemValue 的值的问题!
- 如何用OleDbCommand创建一个Access数据库
{
StringBuilder retVal = new StringBuilder();
// check incoming parameters for null or blank string
if ((inputString != null) && (inputString != String.Empty))
{
inputString = inputString.Trim(); //chop the string incase the client-side max length
//fields are bypassed to prevent buffer over-runs
if (inputString.Length > maxLength)
inputString = inputString.Substring(0, maxLength); //convert some harmful symbols incase the regular
//expression validators are changed
for (int i = 0; i < inputString.Length; i++)
{
switch (inputString[i])
{
case '"':
retVal.Append(""");
break;
case '<':
retVal.Append("<");
break;
case '>':
retVal.Append(">");
break;
default:
retVal.Append(inputString[i]);
break;
}
} // Replace single quotes with white space
retVal.Replace("'", " ");
}
return retVal.ToString();
}