当前位置:Gxlcms > 数据库问题 > C# SQL防注入

C# SQL防注入

时间:2021-07-01 10:21:17 帮助过:13人阅读

string sql = "select * from student where id like" +"@key";
Sqlconnection con = new Sqlconnetion();
Sqlcommand com =new Sqlcommand();
SqlParameter prmid = new SqlParameter();
prmid.ParameterName = "@key";
prmid.Value=key;
com.Parameters.Add(prmid);

 

C# SQL防注入

标签:where   bsp   key   select   csharp   from   str   highlight   sql   

人气教程排行