G
Guest
My following code is not working
I have a gridview that contains a linkButton in a template field. I
want to set the visibility of the linkbutton based on a int field in a
database.
Selecting the proper field in editbindings gives this in the code
<asp:LinkButton ID="btnRemoveAll" runat="server"
Visible='<%#(int.parse(Eval("UserCnt")!=0)) %>'
OnClick="btnRemoveAll_Click">Remove All</asp:LinkButton><br />
(where UserCnt is int field in my database)
This generates the following error.
'int' does not contain a definition for 'parse'
I have a gridview that contains a linkButton in a template field. I
want to set the visibility of the linkbutton based on a int field in a
database.
Selecting the proper field in editbindings gives this in the code
<asp:LinkButton ID="btnRemoveAll" runat="server"
Visible='<%#(int.parse(Eval("UserCnt")!=0)) %>'
OnClick="btnRemoveAll_Click">Remove All</asp:LinkButton><br />
(where UserCnt is int field in my database)
This generates the following error.
'int' does not contain a definition for 'parse'