Hello,
The
SQLDataSource web part does not provide any property that you can use to specify query parameters.
You will need to create a custom web part that will be based on
SQLDataSource control and define query parameters from code:
You can use the
QueryParameters property of the
SQLDataSource:
object[,] parameters = new object[1, 3];
parameters[0, 0] = "@FieldName";
parameters[0, 1] = FieldName;
SQLDataSource.QueryParameters = parameters;
If you need more information about developing a web part, I would like to point you to the following article:
Developing web parts.
Best regards,
Michal Legen