Items.Insert Conflict with Value Field
Posted on 2009-02-20
I have a conflict with the following piece of code-
ddClient.Items.Insert(0, "Select A Client")
Initially, when I display the asp:dropdownlist, I use 0 (zero) for a value,
but I also have a value of 0 (zero) as a valid value for ClientID.
So, In my sp behind the scenes, when I check for the value 0 and I want to display 'Unknown'
after getting the results from my sp; there is a conflict.
Is there any way around this?
I tried setting it to -1 but that didnt work.
i.e. ddClient.Items.Insert(0, "Select A Client")
"Select A Client" didnt show up at all....