Sunil,
You should use DataValueField if you need it. Feel free not to use it if you
don't need it.
An example when you need it:
Consider an application where a user should select a country from a dropdown
list. On the screen you would want to show full country name (like
"Russia"). In the database you would want to store the country code (like
"RU"). Let's say you have a table with all country names and codes.You would
want to set DataTextField to the field holding the country name and
DataValueField to the one holding the country code.
Eliyahu
"Sunil Sabir" <Su********@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
Dear All,
I am actually a bit confused about DataValueField. I know what is the
use of
DataTextField.But dont know anything about DataValue Field.Is it
necessary to use DataValue field whenever we bind any Dropdownbox or listBox.What
if we dont use DataValue field at all and stick with only
DataTextField.Has any 1 encountered any problems when not using DataValueField.What are
the advantages and disadvantages of DataValueField. Any help would be
greatly appreciated.
Cheers,
Sunil Sabir