Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2005, 07:36 AM   PM User | #1
shaoen01
New Coder

 
Join Date: Aug 2005
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
shaoen01 is an unknown quantity at this point
Which element caused postback?

Hi,

I am currently creating a .ascx file to make my own user control which will display images and works something like a dropdownlist. When user select the image, the selected image will be selected just like the dropdownlist. I will create the <input type="image"> for each image file in the specified folder. Which makes my user control dynamic.

I have 2 labels called: lblAll and lblDisplay. lblDisplay: Shows the selected image and lblAll: shows the rest of the remaining images. The <input type="image"> will be placed inside the lblAll and lblDisplay. I have used the <div> tags to expand and collaspe the labels accordingly.

The reason i decided to use <input type="image"> is because i would like a postback so that i can update the newly selected image.

My problem: How am i supposed to know which <input type="image"> was clicked/selected during postback? Thanks
shaoen01 is offline   Reply With Quote
Old 12-17-2005, 09:55 PM   PM User | #2
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,054
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
Here is a demo that uses HtmlInputImage, which is what you're talking about. That uses a couple of different images, so you can see which one triggered the postback. Hope it helps.
__________________
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
SNAP to it!
vinyl-junkie is offline   Reply With Quote
Old 12-18-2005, 08:19 AM   PM User | #3
shaoen01
New Coder

 
Join Date: Aug 2005
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
shaoen01 is an unknown quantity at this point
Hi,

This link is fantastic! Thank you, im sure it will help me a lot. Thanks again!
shaoen01 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:23 AM.


Advertisement
Log in to turn off these ads.