Is there a way to open another page using ModalPop

2019-08-29 20:03发布

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

4条回答
仙女界的扛把子
2楼-- · 2019-08-29 20:10

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楼-- · 2019-08-29 20:15

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

查看更多
等我变得足够好
4楼-- · 2019-08-29 20:21

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.

查看更多
姐就是有狂的资本
5楼-- · 2019-08-29 20:31

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.

查看更多
登录 后发表回答