By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

hyperlind binding

P: n/a
hey all,
i having a problem binding a sql text field to a label inside a DataList.

<asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%#
(Eval("FollowUp")==null)?" ":"View" %>' /><br />

It always results to the false path eventhough it shouldn't do that.

thanks,
rodchar
Jun 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Jun 8, 7:58 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,
i having a problem binding a sql text field to a label inside a DataList.

<asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%#
(Eval("FollowUp")==null)?" ":"View" %>' /><br />

It always results to the false path eventhough it shouldn't do that.

thanks,
rodchar
Instead of the null try to compare with the DBNull.Value
DBNull is used for database null validation

Jun 8 '07 #2

P: n/a
Thank you that worked great.

"Alexey Smirnov" wrote:
On Jun 8, 7:58 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,
i having a problem binding a sql text field to a label inside a DataList.

<asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%#
(Eval("FollowUp")==null)?" ":"View" %>' /><br />

It always results to the false path eventhough it shouldn't do that.

thanks,
rodchar

Instead of the null try to compare with the DBNull.Value
DBNull is used for database null validation

Jun 9 '07 #3

P: n/a
why wouldn't using true work either?

<asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%#
(Eval("FollowUp")==true)?" ":"View" %>' /><br />

"rodchar" wrote:
Thank you that worked great.

"Alexey Smirnov" wrote:
On Jun 8, 7:58 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,
i having a problem binding a sql text field to a label inside a DataList.
>
<asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%#
(Eval("FollowUp")==null)?" ":"View" %>' /><br />
>
It always results to the false path eventhough it shouldn't do that.
>
thanks,
rodchar
Instead of the null try to compare with the DBNull.Value
DBNull is used for database null validation
Jun 11 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.