[thelist] ASP.NET dropdownlist error

Ken Schaefer ken.schaefer at gmail.com
Wed Sep 26 06:10:44 CDT 2007


On 9/26/07, Joel D Canfield <joel at streamliine.com> wrote:
> > What does Bind("DeptName") do?
>
> I assume (since I'm still sorting out how .NET 2.0 thinks) it connects
> this dropdownlist to the db field 'DeptName' included in the query.

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


>
> > How many rows does the query you are executing return?
>
> The query returns these exact results (that'd be 16 rows)


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


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

Cheers
Ken



> 1       Administration
> 2       Development
> 3       Engineering
> 4       Executive Team
> 5       Field Ops
> 6       Field Service
> 7       Finance
> 8       HR
> 9       Information Technology
> 10      Manufacturing
> 11      Marketing
> 12      Product Development
> 13      QA
> 14      Sales
> 15      Sust. Engineering
> 16      Unassigned
> Workers of the Web, evolt !
>



More information about the thelist mailing list