concept multiple value in category asp.net

appears as: multiple values
ASP.NET 4.0 in Practice

This is an excerpt from Manning's book ASP.NET 4.0 in Practice.

The next step is to analyze a specific kind of SQL injection that’s related to handling multiple values in a query. If you need to parse only a single value, the problem is much simpler than when you’re dealing with multiple values.

Listing 10.4. Dynamically composing a query with multiple values

This listing shows you the solution to our problem. We can dynamically generate the SQL string by safely adding the parameters, based on multiple values. It’s perfectly possible to name parameters sequentially, so this is a good solution for our problem. Our solution doesn’t rely on user input, and we can pass the values to the database engine, which will sanitize them for us.