I've been using the above control for some time with no problem with it working on a button click event.
However, this time the scenario is slightly different and I need to force the modalpopup to show during the button click event.
When the user presses my button on a form, I show a messagebox. Depending on the answer, I then either drop out of the click event or I continue. If I continue i want my popup to show since this is basically a progress bar.
If I place cmdSave inside the updatepanel, my popup shows as soon as the button is clicked and I do not get my messagebox first. so I've placed it outside the updatepanel.
In Code assuming the user said yes to the messagebox, I have
Code:
PopUpdate.Show()
but because it's still in the event and no postback has happened the popup does not show and instead my code continues on through.
If you find my answers helpful, dont forget to rate me
ok Guys, I was being a bit stupid, I didn't see the confirmextender control and have now implemented that. It nearly works.
Because my button and the confirmextender is in the update panel, the first time I press my cmdSave button the Progress update get's triggered and so I get my gif flickering on screen for a split second. I then press the cmdSave button a second time and then the confirmExtender kicks in. If I ok or cancel on the extender, the code works fine, and if I cancel multiple times each time I then press my cmd Save the extender shows as expected, so the problem is the very first time my cmdSave is pressed the confirmExtender is overriden by the UpdatePanel.
Protected Sub cmdSaveExtender_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSaveExtender.PreRender
cmdSaveExtender.ConfirmText = msg()
End Sub
If you find my answers helpful, dont forget to rate me
Bookmarks