Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shulink
Starting Member
12 Posts |
Posted - 2007-12-06 : 22:46:28
|
The checkbox is in the edit template mode of datalist. I want to select the values from the database. but the following gives me this error arser Error Message: The ListItem control with a two-way databinding to field FullTime must have an ID.<asp:CheckBoxList ID="JobTypeList" runat="server" RepeatDirection="Horizontal"><asp:listitem value="Full time" Selected='<%# Bind("FullTime") %>' /><asp:listitem value="Part time" Selected='<%# Bind("PartTime") %>'/><asp:listitem value="Contract" Selected='<%# Bind("Contract") %>'/> </asp:CheckBoxList> Does anyone know how can I get this to work? Thanks a lot. |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-12-07 : 07:15:43
|
Dont't use a Checkboxlist; just use regular checkboxes, each with an ID and runat=server attributes. There's no reason to use a list if each checkbox has an individual databinding.- Jeffhttp://weblogs.sqlteam.com/JeffS |
|
|
shulink
Starting Member
12 Posts |
Posted - 2007-12-07 : 09:31:18
|
thank you, I will try that. |
|
|
|
|
|