public string SqlEncode(string inStr)
{
inStr = inStr.Replace("'", "''");
inStr = inStr.Replace("<", "<");
inStr = inStr.Replace(">", ">");
return inStr;
}
public string SqlDecode(string inStr)
{
if (inStr == "")
return null;
inStr = inStr.Replace("''", "'");
inStr = inStr.Replace("<", "<");
inStr = inStr.Replace(">", ">");
return inStr;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment