0

I have a gridview inside UpdatePanel. One of the column in gridview is link which when clicked should display modal. The problem is the modal only gets displayed only once when the link is clicked, the next time when the link is clicked it just refreshes the page. The modal should be displayed everytime when the link inside the gridview is clicked.

The solution given in this link is for jQuery. I am not using jQuery.

Please help me to resolve this issue.

Surprisingly this issue does not occur on IE7. It is occurring on IE9 and Google Chrome.

Community
  • 1
  • 1
VJOY
  • 3,752
  • 12
  • 57
  • 90
  • Are you showing the popup from client- or from serverside? – Tim Schmelter Oct 09 '12 at 12:04
  • 3
    One day, you will wake up and realise that UpdatePanel is evil and that over the long run, you'll save more time by learning Javascript. – Paul Alan Taylor Oct 09 '12 at 12:04
  • I am showing it from server side. On a fake button click, I am calling it's show() method. – VJOY Oct 09 '12 at 12:05
  • So the user clicks on one `LinkButton` in the `GridView`, then the popup is shown from the `LinkButtons` click event (or `OnCommand`) via `ModalPopupExtender.Show()`. Then the popup will be closed later. Then the user clicks again on one `LinkButton` but this time the popup isn't shown anymore, is this correect? – Tim Schmelter Oct 09 '12 at 12:08
  • @TimSchmelter - yes exactly..this is what happening right now. – VJOY Oct 09 '12 at 12:09
  • @VijayBalkawade: How is the popup closed? Do you have postbacks on the popup? Is the popup in a UserControl or in the same page as the `GridView`? – Tim Schmelter Oct 09 '12 at 12:10
  • @TimSchmelter On popup I am using ajax datepicker and 4 textboxes. However I am not performing any operation with these controls. I am opening popup and straight-away closing it. Popup is in user control which has updatepanel. Gridview is inside updatepanel. – VJOY Oct 09 '12 at 12:12

1 Answers1

0

DropShadow property of modal extender was causing problem. I am not sure if anyone has noticed it. However in my case it was set to true. I just set it to false and everything is working fine now under IE7, IE9 and Chrome. Not tested FireFox though, but it should work.

VJOY
  • 3,752
  • 12
  • 57
  • 90