hyperlind binding

Discussion in 'ASP .Net' started by =?Utf-8?B?cm9kY2hhcg==?=, Jun 8, 2007.

  1. 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
    =?Utf-8?B?cm9kY2hhcg==?=, Jun 8, 2007
    #1
    1. Advertising

  2. On Jun 8, 7:58 pm, rodchar <> wrote:
    > 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
    Alexey Smirnov, Jun 8, 2007
    #2
    1. Advertising

  3. Thank you that worked great.

    "Alexey Smirnov" wrote:

    > On Jun 8, 7:58 pm, rodchar <> wrote:
    > > 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
    >
    >
    =?Utf-8?B?cm9kY2hhcg==?=, Jun 9, 2007
    #3
  4. 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 <> wrote:
    > > > 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
    > >
    > >
    =?Utf-8?B?cm9kY2hhcg==?=, Jun 11, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jordan
    Replies:
    2
    Views:
    2,527
    Jordan
    Feb 10, 2004
  2. Amit
    Replies:
    6
    Views:
    13,782
    Assimalyst
    Oct 24, 2006
  3. Replies:
    2
    Views:
    853
    Kevin Grover
    Oct 20, 2006
  4. JcFx
    Replies:
    0
    Views:
    274
  5. Vivek Nallur

    value binding and function binding

    Vivek Nallur, Sep 25, 2003, in forum: Ruby
    Replies:
    0
    Views:
    135
    Vivek Nallur
    Sep 25, 2003
Loading...

Share This Page