What is the best way to handle multiple popup dialogs in ASP.Net Web Application? Trying I have approx 5+ popup dialogs to show in the main page. currently I am using the ModalPopUpExtender to display the first popup. Do I have to Create a (New Panel and ModalPopUpExtender) for every popup? All this code in the main page would make it very cluttered.
What is the best way to handle multiple popup dialogs in ASP.Net Web Application?
Share
How about having a user control with one
modalpopupextenderexposing apublic enum propertyto set the type of the popup. You can have 5 panels inside thatmodalpopupextenderwhose display/data are controlled by the enum property.From the main page, you set the
enumproperty before you callusercontrol.show()which will in turn callmpe.Show();after setting the visibility on the appropriate panel.This way you will only have one user control on the main page and all the pop up logic is contained within it.