dropdownist and postback

B

Brian Shannon

I know this might be a strange thing to ask for but I need it to work in my
intranet application.

I have a dropdown box that has autopostback = true

Let's call the dropdownbox 'cboTest'

Let's say the user makes a selection on the dropdownlist
cboTest.selectedItem.Index = 2 and the page post back. The user wants to
change a value on the page. My boss wants the user to then be able to
reselect the same value on the page and cause a postback.
cboTest.selectedItem.Index = 2.

So, I need to be able to select the same index on a dropdownlist and cause a
postback. Is there a way to overide the function of posting back on index
changes? Can client side code cause the postback on the dropdown box?

Are there any solutions?

My boss wont let me have a postback on the other controls that could change
or add a button to force a postback. All the codebehind needs to be
triggered from cboTest.

Thanks for any advice!
 
M

Marina

I'm not sure how you would reliably figure out that the user reselected the
same value from the dropdown. The changed event would not fire - and you can
try mucking around with click/blur events, but I'm not sure how you could
reliable determine exactly what has happened.

I am not clear why someone would want to reselect the same value from the
dropdown? As a user, that would be a very confusing UI to me. It is more
clear to have a button to click, then to know to select a value that is
already selected in a dropdown - that is completely counterintuitive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
Best cryptoconsultant

Latest Threads

Top