string s="' or 1=1 --"; string sql = String.Format("select * from table where username='{0}' and userpassword='{1}'", s, null);
该字符串结果:
select * from table where username='' or 1=1 --' and userpassword=''
string s="' or 1=1 --"; string sql = String.Format("select * from table where username='{0}' and userpassword='{1}'", s, null);
该字符串结果:
select * from table where username='' or 1=1 --' and userpassword=''