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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:57:18+00:00 2026-06-09T13:57:18+00:00

Need a hand trying to get my rotating banner working properly on my website.

  • 0

Need a hand trying to get my rotating banner working properly on my website. I’m using the jquery cycle plugin which manages the rotation. Within my CMS I’ve got something called a smartform, which contains upto 6 pictures. The code below (something which I wrote by following a tutorial for the banner) works really well. However I would like to somehow get the index of the image and place it within the alt tags. What I am trying to achieve is the alt tag to say “Banner_(ImageIndexNumber)”.

Hopefully someone can help, thanks all

C# Codebehind

private void BannerFill(int contentId)
{
    try
    {
        uxBannerContentBlock.DefaultContentID = contentId;
        uxBannerContentBlock.Fill();
        string xml = uxBannerContentBlock.EkItem.Html;

        SmartForm.RotatingBanner.BannerImage bannerGroup = (SmartForm.RotatingBanner.BannerImage)
        Ektron.Cms.EkXml.Deserialize(typeof(SmartForm.RotatingBanner.BannerImage), xml);

        List<BannerSlide> slides = GetBannerSlides(bannerGroup.Slides);

        //Databind//

        uxBannerRepeater.DataSource = slides;
        uxBannerRepeater.DataBind();
    }
    catch { }
}

protected List<BannerSlide>
    GetBannerSlides(SmartForm.RotatingBanner.BannerImageSlides[] bannerGroupSlides)
{
    List<BannerSlide> bSlides = new List<BannerSlide>();

    foreach (SmartForm.RotatingBanner.BannerImageSlides bgSlide in bannerGroupSlides)
    {

        bSlides.Add(new BannerSlide(bgSlide.Image.img.src));
    }

    return bSlides;
}


public class BannerSlide
{
    //properties//
    public string SlideImage { get; set; }

    //constructor//
    public BannerSlide(string slideImage)
    {
        SlideImage = slideImage;
    }
}

Front end

<div class="slideshow">
<CMS:ContentBlock ID="uxBannerContentBlock" runat="server" Visible="false" />
    <asp:Repeater runat="server" ID="uxBannerRepeater">
        <ItemTemplate>
            <img src="<%# DataBinder.Eval( Container.DataItem,"SlideImage")  %>" alt="Banner_<%# Container.ItemIndex %>" />
        </ItemTemplate>
    </asp:Repeater>

  • 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-09T13:57:19+00:00Added an answer on June 9, 2026 at 1:57 pm
    alt='<%# "Banner_" + Container.ItemIndex %>'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a bit of code working. I'm using xfade, latest version.
I need to get the left hand side integer value from a decimal or
I am trying to get names from a .txt file. I am using file('filename.txt')
We've just started using Backbone and I'm trying to get a handle on a
I'm trying to build a Facebook Auth adapter. Inside it, i need to get
I'm trying to get the hand of the new async CTP stuff and I'm
I'm new to php and I need a hand. I have width by height
I need a quick hand figuring out what this code is doing, and how
I am stuck and in need of a hand. Hope someone can help? Anyone
I have following array, that I need to operate by hand on bitmaps. const

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.