Link to home
Start Free TrialLog in
Avatar of Scarlett72
Scarlett72

asked on

Pass a null value to an objectdatasource from dropdownlist default

Hi, I would like to pass a parameter to an objectdatasource from a dropdownlist.  The first Item of the dropdownlist reads "AllProducts" but when I pass it to the stored proc in the datasource i would actually like it to read null as the default.  How can I do this?

ddlProdSuite.DataSource = pscmd.ExecuteReader();
            ddlProdSuite.DataTextField = "PRODUCT";
            ddlProdSuite.DataValueField = "PRODUCT";
            ddlProdSuite.DataBind();
            psConn.Close();
            ddlProdSuite.Items.Insert(0, "AllProducts");        

Open in new window

SOLUTION
Avatar of Daniel Reynolds
Daniel Reynolds
Flag of United States of America 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
ASKER CERTIFIED SOLUTION
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