views:

35

answers:

1

I have an ajax control toolkit modal popup on my page and in that modal popup i have a gridview on which user select some item through checkbox on each row of gridview. Whenever user check or uncheck on checkbox my modal popup automatically hide. I have set autopost property of checkbox set to true becuase im perporfing some calculation on each checkchanged event. what may be the problem

+2  A: 

Your page is posting back because of the autopostback="true" on the checkbox, thus hiding the modal popup.

Look up 'ASP.Net Page Lifecycle' for further understandinf. It is important to know how this works.

I'm sure you'd also like to know how to solve this.

You could:

  1. Set AutoWireUp=false on the page, but then you'd have to wire all events on the page manually. Since you aren't familiar with the Page Lifecycle, I'm not sure how successful you'd be.

  2. Use a javascript-only modal popup.

  3. Perhaps an UpdatePanel can be used.

TheGeekYouNeed
Should check 3 in priority, a update panel should be put inside the modal pop up so the "calculation on each checkchanged event" wont initiate a full post-back.
DavRob60