Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Using SqlDataSource - but how do I provide it with parameters at runtime?

From the Toolbox I have selected a SqlDataSource.  It has a wizard for building the Select statement, but how do I provide parameters to this Select statement at runtime?  What does my Select statement look like and what do I need to do in the code behind?

I need detailed steps.

Thanks!

Tom
Avatar of Sammy
Sammy
Flag of Canada image

You can still use the same wizard to provide parameters
after the first step "Connection step" the second step the wizard will show 3 buttons Where, Order By and Advanced
if you click on the where button you will get the option to select params
Column, Operator and source
once you select the first param you have to click on Add to add it
Avatar of Tom Knowlton

ASKER

And then in the code behind, what do I do?
The problem is I am building my own SQL Statement in the DataSource.

When I select that option....the Advanced button becomes disabled.
ASKER CERTIFIED SOLUTION
Avatar of Sammy
Sammy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial