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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:23:39+00:00 2026-05-27T21:23:39+00:00

I have an image control inside a repeater. I would like to exclude/ignore a

  • 0

I have an image control inside a repeater. I would like to exclude/ignore a parameter in the imageurl property, because the path(source image) do not have this parameter in the name, but I still want to show the parameter in url. And I can’t rename all the images, as there are a lot. Hope it make sense.

Here is an example.

It is for SEO. Original path

  • /product/0001_100_00_KK00_F02.png

What I want to show in imageurl

  • /product/0001_100_00_KK00_F02.png/Tv-Sony-lcd-black-bravia-KDL-26V4500

OR

  • /product/0001_100_00_KK00_F02/Tv-Sony-lcd-black-bravia-KDL-26V4500.png
    <asp:Repeater ID="rptImages" runat="server">
        <ItemTemplate>
            <asp:Image ID="Image1" ImageUrl='<%# Eval("Url") %>' runat="server" />
        </ItemTemplate>
    </asp:Repeater>

And codebehind

    rptImages.DataSource = Images.Select(s => new { Url = s });
    rptImages.DataBind();

This works fine for the original path. But when I add /Tv-Sony-lcd-black-bravia-KDL-26V45000 to the end of url the images is not found(of course).

So how do I add an extra parameter to the imageurl, but get the image control to ignore this and still find the image path?

Does anyone have any ideas of how to resolve this problem

  • 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-27T21:23:40+00:00Added an answer on May 27, 2026 at 9:23 pm

    You can achive that with URL rewriting. Add global.asax file to your project and use some kind of rewriting logic like this.

        void Application_BeginRequest(Object sender, EventArgs e)
    {
        string currentPath;
        currentPath = Request.Path; // /product/0001_100_00_KK00_F02.png/Tv-Sony-lcd-black-bravia-KDL-26V4500
        if (currentPath.IndexOf(".png") > -1)
        {
            string[] paths = currentPath.Split('/');
            currentPath = currentPath.Replace("/" + paths[paths.Length - 1], ""); // /product/0001_100_00_KK00_F02.png
            Context.RewritePath(currentPath);
        }
    }
    

    This will work but will also rewrite all request.paths which contains”.png” because of “if (currentPath.IndexOf(“.png”) > -1)”
    It is safer to include few more conditioning.

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

Sidebar

Related Questions

I have a button and image inside it in my silverlight user control. When
I have an Image control in my Flex application: <mx:Image id=img source=@Embed('img.png') percentHeight=100 percentWidth=100
I have an image control with a source image located in my c drive.
I have a asp image control. ImageUrl=images/avator.jpg. I'm changing this picture on the server
I have an image inside scroll viewer and i have a control for zooming
I have a view control and inside I plan to place some controls like
I have a listbox contains a datatemplate with Image and TextBlock control inside. I
I have a button and inside my button I have an image control. When
I have a user control in which I have Repeater control and inside this
I have an image gallery that is created using a repeater control. The repeater

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.