Data Repeater

Discussion in 'ASP .Net' started by VIswanathan S, Oct 15, 2005.

  1. Hi All!
    How to use Data Repeater in VB.NET?

    Data Fields are
    Employee Number
    Name
    Photo
    Date of Joining
    Salary

    I want to use all the fields in Data Repeater?

    TIA
    Viswanathan S
    VIswanathan S, Oct 15, 2005
    #1
    1. Advertising

  2. Repeaters are usually, but not always, formatted as tables.

    The tags within the repeater are for the header, item, alternating items,
    footer and separator. You can use databinding statements within the repeater
    to format the code.

    For example...

    <asp:Repeater id="Repeater1" runat="server">
    <HeaderTemplate>
    <table width="800px">
    <tr>
    <th>
    Identifier</th>
    <th>
    Language</th>
    <th>
    Content</th>
    <th>
    Edit</th>
    <th>
    Delete</th>
    </tr>
    </HeaderTemplate>
    <ItemTemplate>
    <tr>
    <td><%# DataBinder.Eval(Container.DataItem,"ident") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"lang") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"content") %></td>
    <td>
    <asp:Button Runat="server" CommandName="edit" Text="Edit"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"contentid") %>'
    ID="Button1" NAME="Button1">
    </asp:Button></td>
    <td>
    <asp:Button Runat="server" CommandName="delete" Text="Delete"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"contentid") %>'
    ID="Button2" NAME="Button2">
    </asp:Button></td>
    </tr>
    </ItemTemplate>
    <AlternatingItemTemplate>
    <tr bgcolor="#00cccc">
    <td><%# DataBinder.Eval(Container.DataItem,"ident") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"lang") %></td>
    <td><%# DataBinder.Eval(Container.DataItem,"content") %></td>
    <td>
    <asp:Button Runat="server" CommandName="edit" Text="Edit"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"contentid") %>'
    ID="Button3" NAME="Button3">
    </asp:Button></td>
    <td>
    <asp:Button Runat="server" CommandName="delete" Text="Delete"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"contentid") %>'
    ID="Button4" NAME="Button4">
    </asp:Button></td>
    </tr>
    </AlternatingItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </asp:Repeater>

    Also.Please will you NOT CROSSPOST!



    --
    Bob Powell [MVP]
    Visual C#, System.Drawing

    Ramuseco Limited .NET consulting
    http://www.ramuseco.com

    Find great Windows Forms articles in Windows Forms Tips and Tricks
    http://www.bobpowell.net/tipstricks.htm

    Answer those GDI+ questions with the GDI+ FAQ
    http://www.bobpowell.net/faqmain.htm

    All new articles provide code in C# and VB.NET.
    Subscribe to the RSS feeds provided and never miss a new article.





    "VIswanathan S" <> wrote in message
    news:...
    > Hi All!
    > How to use Data Repeater in VB.NET?
    >
    > Data Fields are
    > Employee Number
    > Name
    > Photo
    > Date of Joining
    > Salary
    >
    > I want to use all the fields in Data Repeater?
    >
    > TIA
    > Viswanathan S
    >
    >
    Bob Powell [MVP], Oct 15, 2005
    #2
    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. Replies:
    0
    Views:
    845
  2. Replies:
    0
    Views:
    2,867
  3. Replies:
    1
    Views:
    7,011
    Karl Seguin
    Aug 10, 2005
  4. uncensored
    Replies:
    0
    Views:
    799
    uncensored
    Oct 25, 2006
  5. Microsoft

    Repeater inside a Repeater

    Microsoft, Aug 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    194
    Microsoft
    Aug 21, 2006
Loading...

Share This Page