datalist issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DC Gringo

    #1

    datalist issue

    I have a datalist that will always return 2 records. The first record
    should be called "Latest Edition", the second "Previous Edition". How can I
    identify which is which in the .net code and replace have this label show up
    correctly. Below, I have hardcoded in "Latest Edition"..

    <asp:DataList id="DataList1" runat="server" DataSource='<%#
    DataBinder.Eval (DsEobNew1, "Tables[fn3ExecBriefHom e]") %>'
    DataMember="fn3 ExecBriefHome" DataKeyField="g c_id" SHOWHEADER="Fal se"
    SHOWFOOTER="Fal se">

    <ITEMTEMPLATE >
    . <B>Latest Edition</B> - <A HREF="index.asp x?pageID=eobDoc &g=<%#
    DataBinder.Eval (Container, "DataItem.gc_id ") %>"><%#
    DataBinder.Eval (Container, "DataItem.publi shed") %></A>
    </ITEMTEMPLATE>

    </ASP:DATALIST>



    --
    _____
    DC G


  • Shailesh Jannu

    #2
    RE: datalist issue

    You can use DataBind event of DataList to do more complex replace or changes
    inside item template.

    "DC Gringo" wrote:
    [color=blue]
    > I have a datalist that will always return 2 records. The first record
    > should be called "Latest Edition", the second "Previous Edition". How can I
    > identify which is which in the .net code and replace have this label show up
    > correctly. Below, I have hardcoded in "Latest Edition"..
    >
    > <asp:DataList id="DataList1" runat="server" DataSource='<%#
    > DataBinder.Eval (DsEobNew1, "Tables[fn3ExecBriefHom e]") %>'
    > DataMember="fn3 ExecBriefHome" DataKeyField="g c_id" SHOWHEADER="Fal se"
    > SHOWFOOTER="Fal se">
    >
    > <ITEMTEMPLATE >
    > . <B>Latest Edition</B> - <A HREF="index.asp x?pageID=eobDoc &g=<%#
    > DataBinder.Eval (Container, "DataItem.gc_id ") %>"><%#
    > DataBinder.Eval (Container, "DataItem.publi shed") %></A>
    > </ITEMTEMPLATE>
    >
    > </ASP:DATALIST>
    >
    >
    >
    > --
    > _____
    > DC G
    >
    >
    >[/color]

    Comment

    • DC Gringo

      #3
      Re: datalist issue

      Could you elaborate a bit on this? Code sample perhaps?

      _____
      DC G

      "Shailesh Jannu" <ShaileshJannu@ discussions.mic rosoft.com> wrote in message
      news:7CA5517F-3DF9-485D-B897-BF90909C6933@mi crosoft.com...[color=blue]
      > You can use DataBind event of DataList to do more complex replace or[/color]
      changes[color=blue]
      > inside item template.
      >
      > "DC Gringo" wrote:
      >[color=green]
      > > I have a datalist that will always return 2 records. The first record
      > > should be called "Latest Edition", the second "Previous Edition". How[/color][/color]
      can I[color=blue][color=green]
      > > identify which is which in the .net code and replace have this label[/color][/color]
      show up[color=blue][color=green]
      > > correctly. Below, I have hardcoded in "Latest Edition"..
      > >
      > > <asp:DataList id="DataList1" runat="server" DataSource='<%#
      > > DataBinder.Eval (DsEobNew1, "Tables[fn3ExecBriefHom e]") %>'
      > > DataMember="fn3 ExecBriefHome" DataKeyField="g c_id" SHOWHEADER="Fal se"
      > > SHOWFOOTER="Fal se">
      > >
      > > <ITEMTEMPLATE >
      > > . <B>Latest Edition</B> - <A[/color][/color]
      HREF="index.asp x?pageID=eobDoc &g=<%#[color=blue][color=green]
      > > DataBinder.Eval (Container, "DataItem.gc_id ") %>"><%#
      > > DataBinder.Eval (Container, "DataItem.publi shed") %></A>
      > > </ITEMTEMPLATE>
      > >
      > > </ASP:DATALIST>
      > >
      > >
      > >
      > > --
      > > _____
      > > DC G
      > >
      > >
      > >[/color][/color]


      Comment

      Working...