问题
I was wondering if there is way to open another page using a Modal Popup Extender? and if there is can someone please the tell me how do i go about doing it ..
Thanx
Owais
回答1:
You could probably put an iframe pointing to the page within the Modal Popup Extender, however that would be a bit of a hack. I would recommend putting whatever content on that page into a user control and then referencing that control from both the original page and the page with the modal popup.
回答2:
Try using an HTML iframe as the target control of the extender. The iframe tag has a "src" attribute that should point to the page you want to show in the dialog.
回答3:
You have to think about it w/o the illusion - fundamentally the modal popup is just a DIV. So the question is "can you display a different page in a div?". Iframe... or perhaps a webservice call.
回答4:
you can use a user control and load it dynamically into the modal popup
Dim ctrl As Control
ctrl = Me.Page.LoadControl("~/control/cmsbar.ascx")
ctrl.id="ctrlx"
Placeholder1.Controls.Add(ctrl)
popup.Show()
note that the popup will have a placeholder to add the control to. you must give the user control an id so the viewstate can be loaded for the control . this code must be placed in the Page_Init event so when the user control is created for the second time it loads its view state
来源:https://stackoverflow.com/questions/462801/is-there-a-way-to-open-another-page-using-modalpopup-extender