Modal form in popup

John Smith asked on January 24, 2018 14:49


What would be best practice in implementing a modal form on the front end UI in a popup? What i'm trying to do is display a <cms:BasicForm /> for example inside that popup and save the data on submit.

Thanks you,

Correct Answer

Michal Novák answered on January 26, 2018 08:50

You can wrap the <cms:BasicForm /> control with <asp:UpdatePanel/>. Form will be submitted using AJAX call and modal dialog stay open.

You can use javascript to handle end request event which is raised after an asynchronous postback is finished and control has been returned to the browser.

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function (s, e) {
1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.