[thelist] ASP.NET dropdownlist error

Joel D Canfield joel at streamliine.com
Wed Sep 26 11:00:38 CDT 2007


> That's what the DataTextField (what is displayed) and the
> DataValueField (the HTML value attribute) are for.

That makes sense, which means I have no idea what Bind("DeptName") is
doing

> So your query is returning 16 rows, and you are trying to set the
> SelectedValue to be which of those 16 values?

Good question, and possibly where this is all disconnecting. The
selected value in the Departments DDL should be the existing value for
department in the Employee query. (In this case the actual values are id
= 9, deptname = "Information Technology")

> Also you mention you are working from Stephen's book - which page is
> this code from?

pp 542-3, listing 11.27 for ShowTemplateField.aspx

Thanks once again, Ken (and all)

joel



More information about the thelist mailing list