tags:

views:

2545

answers:

3

Hi all.

I have a gridview control where if the user click on the auto generated edit button. A window will pop up using modalpopup extender with a drop down list for user to select. The problem is the selectedindexchange event will not fire if autopostback is set to false but if i set the autopostback to true. the pop up will go away without going to the selectedindexchange event.

is it possible to have a control with autopostback set to true inside the modal pop up?

A: 

The problem is the selectedindexchange event will not fire if autopostback is set to false...

I'm not sure that statement is strictly true. Isn't it a case that if autopostback is false, the SelectedIndexChange event fires during the next postback? So if you change the index, then click a Submit button, that's when the index change event is fired.

This isn't much good if you need server code to run to respond to the index change while the popup is still showing, but otherwise, you can still respond to the index change.

If you need to change something in the popup in response to the index change, you can always use client-side javascript.

Simes
A: 

You can use an UpdatePanel to resolve this problem. Wrap the DropDownList and any other controls that might give similar issue inside of an UpdatePanel, inside of the pop-up control. This will allow the pop-up to continue Showing, while executing your postback code at the right time.

browe
A: 

xcxcxcxzcxzcxzcxzcxzcxcxzcxcxzcxzc

sdsadsa