Link to home
Start Free TrialLog in
Avatar of prinsbj
prinsbjFlag for Netherlands

asked on

How to set the default value of a Ajax combobox with a datasource to Null (empty)?

Can somebody help me with the following problem?

I've Ajax combobox in mij aspx page wich is filled by a Datasource. But when i run this page I get default a value from the datesource.

I'll have only a empty Combobox at the begin.

This is my combobox and datasource.
Stocknumber&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<cc1:ComboBox 
            ID="cboStocknumber" runat="server" 
            AutoCompleteMode="SuggestAppend" DataSourceID="StocknumberDS" 
            DataTextField="StockNumber" DataValueField="StockNumber" MaxLength="0" 
            style="display: inline;" Width="200px">
        </cc1:ComboBox>

<asp:SqlDataSource ID="StocknumberDS" runat="server" 
            ConnectionString="<%$ ConnectionStrings:CWSConnectionString %>" 
            
            SelectCommand="SELECT [CustomerID], [StockNumber] FROM [CustomerStockNumber] WHERE ([CustomerID] = @CustomerID)">
            <SelectParameters>
                <asp:ControlParameter ControlID="cboCustomer" Name="CustomerID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of tovvenki
tovvenki

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