I have a Sqldatasource1.SelectCommand = "Select * from Table1 where X = ?"
I want the value of X be based on selectedValue of Dropdownlist1
So I set
Sqldatasource1.SelectParameters("X").DefaultValue = DropDownList1.SelectedValue.tostring
It goes to error saying null value
I need to do it by code since on page load, the Sqldatasource1 control has another SelectCommand like this
Select * from table3
and I want when DDL1 is selected, its database is changed to based on selectedvalue of DDL1

How should I modify the code, thanks

Go to the complete details ...