Try our conversational search powered by Generative AI!

flash images link.

Vote:
 

Hi,

I have flash in my start page of my website. and lots of images properties and and i am able to show various images  with the help of:

var images = from image in properties
                             select new System.Web.UI.WebControls.Image
                             {
                                 ImageUrl = image.Value.ToString(),
                                 AlternateText = "start",
                                 ID = "imagecarousel",
                               
                             };

I also want to ass the link to the images, so that if someonr click the images of my flash, he got redirected to that page.

Is there any way to do it.

#46370
Dec 08, 2010 14:32
Vote:
 

I have no idea how your flash works, but to wrap the images in hyperlinks you can just do

var hyperlinks = images.Select(image =>
{
  var link = new HyperLink();
  link.TargetUrl = // Find the URL somehow, I don't know how you connect the images to pages
  link.Controls.Add(image);
  return image;
}

Actually, i think the HyperLink control even has a ImageUrl property which you can set to display an image instead of text, thereby simplifying this code to something similar to your first example.

Note: All code is freehand, syntax errors are probably abundant...

#46372
Dec 08, 2010 14:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.