Binding DropDownList II

Brady Kelly <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Organization Chase Software
Message-ID <[email protected]>
OK, moving on, I use ItemDataBound to set the DataSource and DataValueField
and DataTextField properties on a DropDownList and suddenly my markup data
binding expression, "Text='<%# Eval("TSAdminuserID") %>'" doesn't work any
more.  I get the following exception:



Databinding methods such as Eval(), XPath(), and Bind() can only be used in
the context of a databound control



WTF?  Why is it not seen as bound any more?



My ItemDataBound binding code is as follows:



                ddlTimeSheetType.DataSource =
this.MyController.TimesheetTypeList;

                ddlTimeSheetType.DataValueField = "Value";

                ddlTimeSheetType.DataTextField = "Text";

                ddlTimeSheetType.DataBind();


===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.