Last post Jan 20, 2011 06:43 PM by elmoWatson
Jan 20, 2011 05:49 PM|elmoWatson|LINK
I've got a Dropdownlist with Categories
I've also got a Listbox with Items filled using the selection from the DDL (autopostback=true).
I have a SQLDataSource for each one.
the DDL populates perfectly. the listbox SQL DataSource uses a stored procedure, that, on its own works perfectly.
It works well just as outlined above. However, when I add the following properties to the DDL, I get an error:
appendDataBoundItems=true and '--Select--' (tried 'Select' also) as an item
the error is:
Input string was not in a correct format
I also set up the sqlDataSource selecting event handler, so that it would check for 'Select' first, but it bypasses that handler when debugging, and goes straight to the error msg
I set web.config to debug=true and set customErrors to Off and that's all I get....
Jan 20, 2011 06:19 PM|PeteNet|LINK
what is the Value of the ListItem you've set to "--Select--" ?
you could try to set it to "", so:
<asp:ListItem Value="" Text="--Select--"/>
Jan 20, 2011 06:43 PM|elmoWatson|LINK
DOAH!! - - must have been a brain scramble - I knew that - since the values were numeric, I just set the value (which previously had equalled the text) to zero and it worked like a charm...