Consider below query , i am passing (-- double dash in username to bypass password)
- SqlCommand cmd=new SqlCommand("Select * from users where username=@UserName and Password=@password",con );
According to me , the query now becomes
- Select * from users where username='Sachin'--' and Password=''
Please take the same example and clearify.


Amit GuptaRank #190 · 12.8K reputationPosted Dec 28, 2020, 9:47 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 28, 2020, 10:13 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 28, 2020, 9:51 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 28, 2020, 9:53 AM EST