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 6026199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:24:40+00:00 2026-05-23T04:24:40+00:00

im working on a site built in .net and I have no idea how

  • 0

im working on a site built in .net and I have no idea how the technology works! I have this snippet of code which builds a div and repeats it

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BS_topsell.ascx.cs" Inherits="Controls_BS_topsell" %>

<div class="row">
<h2>Top Sellers</h2>

 <asp:ListView ID="LV_Products" runat="server" 
     onitemdatabound="LV_Products_ItemDataBound" DataKeyNames="ProductID">

    <ItemTemplate>
       <asp:HyperLink ID="HL_ProductItem" runat="server" CssClass="prod-box first" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Link") %>'>
        <div id="lb">
          <div id="rb">
            <div id="bb">
              <div id="blc">
                <div id="brc">
                  <div id="tb">
                    <div id="tlc">
                      <div id="trc">
                        <div class="prod-content">

                          <asp:Image ID="IMG_Product" runat="server" ImageUrl="~/_includes/images/products/category/" CssClass="prod-image" />

                          <div class="prod-info">
                           <%# DataBinder.Eval(Container.DataItem, "ProductName")%>

                            <span class="prod-price">£ <%# DataBinder.Eval(Container.DataItem, "Sale_Price")%></span>

                           </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        </asp:HyperLink>
    </ItemTemplate>
 </asp:ListView>

 <div class="clearer"></div>

Is it possible to have the CssClass to only be applied to the first one and then a different class to the next?

  • 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-05-23T04:24:41+00:00Added an answer on May 23, 2026 at 4:24 am

    Why not use the Header Template of the repeater and put the header divs in the Header Template

    <asp:Repeater>
    <HeaderTemplate>
    ..........
    </HeaderTemplate>
    <ItemTemplate>
    ..........
    </ItemTemplate>
    
    </asp:Repeater>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a site, which needs to have a feature of users capturing
I have uploaded a site built with asp.net 2.0 in a sub directory created
I have a .NET Windows serivce protected with {smartassembly} which works fine, except that
I have a site built on ASP.NET and C#. One of the requirements of
I've built a notification system for an ASP.NET MVC3 site I've been working on
I'm using this tutorial to get internal messages working on my site: http://www.novawave.net/public/rails_messaging_tutorial.html But,
Currently working on a site built in Django and i'm getting an issue when
I'm working on a fairly large web site built in PHP that will potentially
A site I am working on that is built using PHP is sometimes showing
I have to make some mods to an existing (and working) magento site. So

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.