You can append the attributes to the Image objects via code behind by:
Image1.Attributes.Add("onmouseover","this.style.background = '#000'");
Image1.Attributes.Add("onmouseout","this.style.background = '#eee'");
Image1.Attributes.Add("style","cursor:hand;");
if you have a lot of images and they are being dynamically created, you can create
a "Wrapper Object" by placing a if they are equal to typeof(Image), then add the controls like above.
triggered
Contributor
3356 Points
908 Posts
Re: How to make photos "appear clickable" ?
Dec 23, 2007 05:22 PM|LINK
You can append the attributes to the Image objects via code behind by:
Image1.Attributes.Add("onmouseover","this.style.background = '#000'"); Image1.Attributes.Add("onmouseout","this.style.background = '#eee'"); Image1.Attributes.Add("style","cursor:hand;"); if you have a lot of images and they are being dynamically created, you can create a "Wrapper Object" by placing a if they are equal to typeof(Image), then add the controls like above.