Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to show multiple images by using single ASP Image Control?? I have a scenario where i need to show multiple images e.g 2, 3 , or 4 images depending on if else condition from "_layout/images/image1.gif" folder.

Or is there any way to do this by using Image data type ?

share|improve this question
Its unclear of what you are trying to do, provide more information – Arsalan Adam Khatri Nov 21 '12 at 11:47
want to show more than one image using single ASP image control – SPBeginer Nov 21 '12 at 12:05

1 Answer

through codebehind it is possible, you would need to have an event like a button or dropdownbox with an onclick or selectionchanged event. Within that event you can have your if function that can switch between different image url using the same image control. You might need to wrap it in an updatepanel so it stops the refreshing of the page(postback) and only does partial postback for the image control to change the image url to display the correct image!

I think that is what you want?

hope it helps :)

share|improve this answer
Thanks! But my requirement is to show more than one image under some condition. Is it possible using single Image Control?? – SPBeginer Nov 21 '12 at 12:03
You can create Image Control runtime, set its properties and add it to a panel... – Arsalan Adam Khatri Nov 21 '12 at 12:06
Its not possible. Look at: stackoverflow.com/questions/5935448/… – SPBeginer Nov 21 '12 at 15:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.