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
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.
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.
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.
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
Related
i want to create a popup window when clicking on a button in webform and after that i want to show a user control in that popup.how to do in asp.net?
i tried with some jquery methods but nothing happens when clicking button?
i want to create a popup window when clicking on a button in webform and after that i want to show a user control in that popup.how to do in asp.net?
i tried with some jquery methods but nothing happens when clicking button?
Think about using an IFrame to achieve this, from the sounds of what you are talking an IFrame would suffice and provided the needed functionality.
<iframe src="YOUR PAGE HERE"></iframe>
There's a lot more you can do with it, these are just the tags to get you going.
I have put sign out button in master page. I have a page in which I use that master page and I also have update panel in this page. When I click on sign out button , it does not work. When I use anchor tag it works but I want to use Button.
Thanks,
this might be happen if you are using requiredfield validations for some input fields. try
CausesValidation="false"
for the button control and check. hope this help you.
I had the same problem and I solved deleting the main div nested in the asp Content placeholder. For me all the controls inserted in the masterpage was freezed, buttons, dropdown box, all in other words.
I have an aspx page (let say page1.aspx) having labels and buttons on it. In some other page i need to show content of page1.aspx in modal popup. I have read many articles, but did't find exact solution. Some of the possible ideas are, 1: create Usercontrol, 2: Use Server.execute() method.
Please suggest any solution. Thanks
If you simply want to show a popup (a modal dialog) you can create an user control which contains the markup form page1.aspx and use either AjaxControlTookit (ModalPopup) or jQuery.dialog
I prefer the jQuery.Dialog, it saves 2 postbacks to the server and is easier to integrate.
Here is how to integrate it with ASP .Net, a little trick so the inputs inside that dialog will be posted to server, when the button is clicked.
I'd like to create email dialog that has several inputs including message textbox plus some other custom info. I'd like it to display center screen over top of main page setting the opacity to like 50%.
do i create the pop up as anohter aspx page or panel?
Not sure what to use here, z-index, modalPopupExtender, Javascript, jquery. looking for easy and something stable.
I would look into the ModalPopupExtender in the AJAX Toolkit.
You can also try creating the dialog with jQuery. If you decide to go that route, check out the jQuery UI dialog:
http://jqueryui.com/demos/dialog/
I have a page with a user control which gets some data updated via a modal popup. Upon clicking "ok" on the modal popup - the new data is being written to the database - but the base page doesnt "reload" to show the updated data. How do I get that to happen?
1) Don't set the OKControlID property on the ModalPopupExtender.
2) In your Page_Load, set OkButton.OnClientClick = string.Format("$find('{0}').hide();", modalPopupExtender1.ClientID);
Explanation:
Setting the OkControlID stops the button from posting back. Instead, manually use javascript to hide the extender, which will allow the button to post the form.
You'll either have to update that control using ajax, or you could just do a Response.Redirect(assuming your modal is .net, or document.location if js) back to your page after your data has been updated.
Make sure the "Ok" button in your modal popup is causing a postback. If you want it to be ajax-enabled, make sure to put it inside of an update panel.