Bootstrap modal popup auto closing - asp.net

My Bootstrap modal popup is working fine. But my problem is that, my popup is opening an editProductImage.aspx page for image editing.
When I click on server side upload event, the modal popup is closed and editProductImage.aspx is opened in new window.
I want that modal popup to close after I click on the Close button. It should not close when uploading the image through the modal popup.

You are using server side control. That will cause a post back and refresh the page, if you want to keep the modal up, try posting the data from client side, using Ajax.

Related

Why does the popup in elementor closes after form submit?

I have a contact form in my popup using elementor pro, as soon as I click the submit button it closes the popup without me having clicked the close button. How can I prevent it from closing, as I need to see the confirmation message?enter image description here
you can set it on this https://docs.elementor.com/article/343-actions-after-submit, but since your form is popup already, I doubt you can create another popup to make some confirmation dialog

How to hide the .aspx page when jquery popup box is opened?

I have an Navigation link, when user click the link, popup dialogue box is opened,at the same time i want to hide the aspx page. It means user unable to perform any operation until user click the close button in dialogue box.
You need the modal dialog.
$(".selector").dialog({
modal: true
});

how to open modal dialog within Repeater control in asp.net

I have a scrolling photo gallery in home page where there is some message in the bottom photo gallery it display only 120 character and there is a link says "continue reading" when I clicked on that link a modal dialog should be opened and it displays message from database.
These photos are continues moving and the photos are coming from database so that for that functionality I am using repeater. Photos are scrolling successfully but messages are not displayed.
I am little bit confusing how to do this so please help me.Thanks in advance..!
You can use a model popup extender from ajax control toolkit
http://www.ajaxcontroltoolkit.com/ModalPopup/ModalPopup.aspx
Or you can make a modal popup your own with simple css and javascript (jquery)
Try with jquery ui
http://jqueryui.com/dialog/

To close popup window

I am opening form in popup window ,when i click on close button it fires click event of close button and it closes the window but again it calls page load event of the window and popup remains open until i explicitly close it by clicking browser close button.I have checked
IsPostback.Please help me to close the window
Ensure that it is not being reopened on your page load event. Ideally you should not be calling a server side event to close a window. This type of action should be handled client side with JavaScript to provide your users with a smoother
user experience.
You can achieve this by adding a OnClientClick event to your button and handle the close event via a function.

Asp.net prevent modal popup to get displayed while clicking on browser back button

GoodEvening Everyone,
I am having one asp.net application which contains many links. some of the link displays modal popup Now if i move to link which nabvigates me and click on browser back button so modal popup gets display which i dont want. i need the previous page should get displayed instead of modal popup if i click on browser back button
for example
i clicked on link1 - navigated to page2
i clicked on link2 - displayed modal popup
i click on link3 - navigated to page3
Now if i click on browser back button so modal popup get displays instead of which i want the page2(previous page before the modal popup ) should get displayed.
So please let me know is this possible and how its possible.
It will be appreciated if some one provide me code to do this...
Let me know in case of more information required
There are several reasons this might be happening.
It might be that you are setting some state flags that persist between pages that influence the modal popups visibility. If you need help with this we will need some more details and preferably code samples.
It might be a browser caching issue. When you hit the back button the browser might be fetching the page from it's cache (not the server) with the popup visible. To test this you could disable the browsers cache and run through your process. If this proves to be the reason you can disable browser caching for your site by adding some meta tags (you'll find the exact tags on Google easily)

Resources