Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8764405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:01:31+00:00 2026-06-13T16:01:31+00:00

I am using a repeater control that shows data for some table. Each row

  • 0

I am using a repeater control that shows data for some table. Each row in the repeater contains two columns: an icon (red/yellow/green circle) and an explanation.

I have to Goals, the first goal is to create the same repeater only now I need it to be horizontal. The second goal is that I need each icon (red/ green/ yellow circle) to be a button so that when I press on one of the icons, an event occurs (doesn’t matter what, say Response.Write(“Green is Pressed”);

Can you help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:01:32+00:00Added an answer on June 13, 2026 at 4:01 pm

    To make it horizontal you can use the li list as inline, a css trick. The full code for that :

    <head runat="server">
        <style type="text/css">
        #navlist li
        {
            display: inline;
            list-style-type: none;
            padding-right: 20px;
        }   
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="navcontainer">
        <ul id="navlist">
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                <li>Some text and my id: <%# GetID(Container.DataItem) %></li>
            </ItemTemplate>
        </asp:Repeater>
        </ul>
        </div>
        </form>
    </body>
    </html>
    

    and on code behind:

    public partial class Dokimes_StackOverFlow_HorizontialRepeater : System.Web.UI.Page
    {
        List<int> oMainIds = new List<int>();
    
        protected void Page_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < 10; i++)
            {
                oMainIds.Add(i);
            }
    
            Repeater1.DataSource = oMainIds;
            Repeater1.DataBind();
        }
    
        public int GetID(object oItem)
        {
            return (int)oItem;
        }
    }
    

    and you have a render like:

    Some text and my id: 0 Some text and my id: 1 Some text and my id: 2
    Some text and my id: 3 Some text and my id: 4 Some text and my id: 5
    Some text and my id: 6 Some text and my id: 7 Some text and my id: 8
    Some text and my id: 9

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control that contains a repeater. The repeater contains some control,
In my usercontrol, I have a repeater that contains some data from the DB.
Greetings! I have a Repeater control that's using an XmlDataSource control. <asp:FormView id=myFormView runat=server
I have a repeater that's bound to a SQL Data Source (using ASP.NET). Are
I have some thumbnails that I display with a Repeater, using a hyperlink and
I am using repeater to bind all table data. And My table fields are
Im using a repeater control and a databinder to display data from the database
I'm using ASP.NET and a Repeater control to display my data. The data I
I'm building an ASP.NET user control that contains a repeater. In the ItemTemplate, I've
I am using an asp:Repeater control in my .aspx page that looks similar to:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.