Finding if an value exists in a DD list

S

Stu

Hi,

I have a web form that uses simple binding to bind properties to the
controls on the page. However, if I try and bind a value to a dd list using:

SelectedValue="<%# MyProperty %>"

If the value doesn't exist it throws and error: Object reference not set to
an instance of an object.
Is there any way to test if a value exists in a DD list (preferably without
looping through each item individually)?

Thanks in advance,

Stu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top