A
Alexander Widera
Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some
strings and integer-values... but some of the intergervalues could be a
<DBNull>-value.
In the repeater is a link, which should only be visible, if the an
integer-value isn't null (dbnull) (the value should be a number!).
I've tried much, but nothing worked. I get always an error-message with an
exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also:
((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please?
thanks a lot,
Alex
i'm using an asp:Reader and an ObjectDataSource. With this I get some
strings and integer-values... but some of the intergervalues could be a
<DBNull>-value.
In the repeater is a link, which should only be visible, if the an
integer-value isn't null (dbnull) (the value should be a number!).
I've tried much, but nothing worked. I get always an error-message with an
exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also:
((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please?
thanks a lot,
Alex