Click here to Skip to main content
15,895,192 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to get and compare values between two gridviews Pin
Agent__00716-Apr-14 22:02
professionalAgent__00716-Apr-14 22:02 
SuggestionRe: how to get and compare values between two gridviews Pin
Richard MacCutchan16-Apr-14 22:29
mveRichard MacCutchan16-Apr-14 22:29 
SuggestionRe: how to get and compare values between two gridviews Pin
Richard Deeming17-Apr-14 2:04
mveRichard Deeming17-Apr-14 2:04 
GeneralRe: how to get and compare values between two gridviews Pin
Richard MacCutchan17-Apr-14 5:27
mveRichard MacCutchan17-Apr-14 5:27 
GeneralRe: how to get and compare values between two gridviews Pin
Eddy Vluggen17-Apr-14 5:40
professionalEddy Vluggen17-Apr-14 5:40 
GeneralRe: how to get and compare values between two gridviews Pin
Richard Deeming17-Apr-14 5:40
mveRichard Deeming17-Apr-14 5:40 
GeneralRe: how to get and compare values between two gridviews Pin
Richard MacCutchan17-Apr-14 6:08
mveRichard MacCutchan17-Apr-14 6:08 
GeneralRe: how to get and compare values between two gridviews Pin
Richard Deeming17-Apr-14 6:37
mveRichard Deeming17-Apr-14 6:37 
Richard MacCutchan wrote:
you obviously do not understand how SQL injection works

And you "obviously do not understand" how a civilized conversation works! Let's agree to drop the insults and concentrate on the code.

The problem is not that the query you posted is susceptible to SQLi; the problem is that it encourages users to think that string.Format is a good way to build any SQL query, without understanding the details of why your particular query is immune. They will then use your code sample as the definitive way of putting parameters into a SQL query, which will result in SQLi vulnerabilities in their code.

It's not difficult to use parameterized queries in ADO.NET, so there's no reason not to use them for every query, even when you're absolutely certain that string.Format or string concatenation would not introduce a vulnerability.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: how to get and compare values between two gridviews Pin
Richard MacCutchan17-Apr-14 6:52
mveRichard MacCutchan17-Apr-14 6:52 
GeneralRe: how to get and compare values between two gridviews Pin
Richard Deeming17-Apr-14 7:11
mveRichard Deeming17-Apr-14 7:11 
GeneralRe: how to get and compare values between two gridviews Pin
Richard MacCutchan17-Apr-14 7:22
mveRichard MacCutchan17-Apr-14 7:22 
SuggestionRe: how to get and compare values between two gridviews Pin
Richard MacCutchan16-Apr-14 22:31
mveRichard MacCutchan16-Apr-14 22:31 
QuestionHow to insert img file in sql server database and show it in a page regarding a particular user? Pin
krish099116-Apr-14 19:48
krish099116-Apr-14 19:48 
AnswerRe: How to insert img file in sql server database and show it in a page regarding a particular user? Pin
Peter Leow16-Apr-14 19:59
professionalPeter Leow16-Apr-14 19:59 
Questionc# implicit operator Pin
Member 378753716-Apr-14 9:50
Member 378753716-Apr-14 9:50 
AnswerRe: c# implicit operator Pin
BillWoodruff16-Apr-14 17:17
professionalBillWoodruff16-Apr-14 17:17 
GeneralRe: c# implicit operator Pin
Member 378753716-Apr-14 18:36
Member 378753716-Apr-14 18:36 
GeneralRe: c# implicit operator Pin
Member 378753716-Apr-14 18:47
Member 378753716-Apr-14 18:47 
GeneralRe: c# implicit operator Pin
BillWoodruff16-Apr-14 23:22
professionalBillWoodruff16-Apr-14 23:22 
GeneralRe: c# implicit operator Pin
Member 378753716-Apr-14 18:51
Member 378753716-Apr-14 18:51 
Questionconvert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Nico Haegens16-Apr-14 6:46
professionalNico Haegens16-Apr-14 6:46 
AnswerRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
SledgeHammer0116-Apr-14 7:05
SledgeHammer0116-Apr-14 7:05 
GeneralRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Nico Haegens16-Apr-14 7:15
professionalNico Haegens16-Apr-14 7:15 
AnswerRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Richard Deeming16-Apr-14 7:57
mveRichard Deeming16-Apr-14 7:57 
GeneralRe: convert List<typethatimplementsinterface> to List<interface>, is there a simple way to do this? Pin
Nico Haegens16-Apr-14 23:24
professionalNico Haegens16-Apr-14 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.