I am using VS 2008. I have a gridview with several columns that are
checkboxes. The data for each column is either a 1 or 0. When I try to
view the page in the browser I get an error "Specified cast is not
valid". Below is the code for the column. PL is the field name in the
datasource. It is a string field. I did change it to integer and still
received the same error message. What could be causing the error?
TIA
<asp:TemplateFi eld>
<EditItemTempla te>
asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#
Bind("PL") %>' />
</EditItemTemplat e>
<ItemTemplate >
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#
Bind("PL") %>'
Enabled="false" />
</ItemTemplate>
checkboxes. The data for each column is either a 1 or 0. When I try to
view the page in the browser I get an error "Specified cast is not
valid". Below is the code for the column. PL is the field name in the
datasource. It is a string field. I did change it to integer and still
received the same error message. What could be causing the error?
TIA
<asp:TemplateFi eld>
<EditItemTempla te>
asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#
Bind("PL") %>' />
</EditItemTemplat e>
<ItemTemplate >
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#
Bind("PL") %>'
Enabled="false" />
</ItemTemplate>
Comment