0

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

devforall
  • 7,217
  • 12
  • 36
  • 42

4 Answers4

2

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.

Jim Petkus
  • 4,500
  • 25
  • 19
1

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.

Captain Sensible
  • 4,946
  • 4
  • 36
  • 46
0

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.

0

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