KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
For the life of me I cannot bind the Checked property of a CheckBox control within a TemplateField (declaritively). I have tried: <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="deactivated" runat="server" checked="<%#Eval("Deactivated")%>"></asp:CheckBox> </ItemTemplate> <asp:TemplateField> and <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="deactivated" runat="server" checked="<%#Eval(Container.DataItem, "Deactivated")%>"></asp:CheckBox> </ItemTemplate> </asp:TemplateField> </asp:TemplateField> I keep seeing a warning stating: Cannot create an object of type 'System.Boolean' from it's string representation' 'for the 'Checked' property What am I doing wrong?
Tags (comma-separated)
Save Edits
Cancel