Friday, March 16, 2012

Modal Popup with code behind questions?

Hi,

I used to use VB code behind to run one button, but now I use AJAX Modal Popup. The modal popup is used Javascript, but the button is implement in vb code behind. Question is how I link "onOKscript" to the code behind. The code behind is need to get database data to update listbox. Is it a way to this?

Modal Popup OkClick --> Database -->Update Listbox

Thank very much,

If you want Ok button to run the server code, then takeout the OKControlID and OnOkScript properties from the modalpopupextender.


Thank you very much and thank you so much.


Thanks for the answer. I have another one. Can I control Modal Popup that popup after button_click execute codebehind?

Button_Click-->code behind-->Modal Popup AJAX

Thanks,


Yes. Like for example you want to show or hide the modal popup.

mpe.Show()mpe.Hide()

Hi CodeASP,

Thank for your magic trick about OKcontrolID. I have another problem that I think you would know it. I did take out OKcontrolID, OnOkScript. I don't want to get refresh on the page, so I use that Button connecting to UpdatePanel. It works, but only one problem is after the button is click, the page still has gray color, doesn't go back to back like before popup. Show me another magic trick.

Thanks so much,

e2Net


If you are using UpdatePanel then to refresh the it make sure you call the UpdatePanel.Update() which will force the updatepanel to refresh. To hide the Modalpopup you have to use Mpe.Hide(). If these doesn't work, please post your relevant code here.

0 comments:

Post a Comment