M
Mark B
I have a gridview that contains a linkButton in a template field. I
want to set the visibility of the linkbutton based on a bit field in a
database.
Selecting the proper field in editbindings gives this in the code
Visible='<%# Eval("completed") %>'. (where "completed" is a bit field
in a sql server database)
This generates the following error.
Exception Details: System.InvalidCastException: Specified cast is not
valid.
Line 120: <asp:LinkButton ID="lbWorkFlow" runat="server"
CommandName="Select" text="Mark Completed"
Line 121: CommandArgument='<%# Eval("stepIdNo", "{0}") %>' Visible='<
%# Eval("completed") %>' ></asp:LinkButton>
I know it's reading the database because if I bind the same field to
the text property, it changes the text to "True" or "False".
Thanks in advance,
Mark B
want to set the visibility of the linkbutton based on a bit field in a
database.
Selecting the proper field in editbindings gives this in the code
Visible='<%# Eval("completed") %>'. (where "completed" is a bit field
in a sql server database)
This generates the following error.
Exception Details: System.InvalidCastException: Specified cast is not
valid.
Line 120: <asp:LinkButton ID="lbWorkFlow" runat="server"
CommandName="Select" text="Mark Completed"
Line 121: CommandArgument='<%# Eval("stepIdNo", "{0}") %>' Visible='<
%# Eval("completed") %>' ></asp:LinkButton>
I know it's reading the database because if I bind the same field to
the text property, it changes the text to "True" or "False".
Thanks in advance,
Mark B