prevent modalpopup closing on postback - asp.net

I have a textbox, button and gridview inside jquery modal popup. On page load I display the modal popup and enter a value in textbox then click button. In code-behind I wrote some functionality to calculate something and displayed it in the gridview but the modal popup should not close. In my case, while post back the modal popup closed. I'am not using modalpopupextender and update panel, without using modalpopup extender and update panel how to prevent modal popup closing while post back?

Related

How to use ASP Controls inside a jQuery Dialog box ?

I have a div which is working as a jQuery Dialog box. Inside that I have two asp:ListBoxes and a asp:button. I want to select an Item from the ListBox1 and when clicking the button that Item should move to ListBox2. But when I clicking on the button Postback occurs and closes the jQuery Dialog.
How can I solve this ?
Put an UpdatePanel "inside" the Dialog Box and put asp:ListBoxes inside UpdatePanel so you prevent page from doing refresh and also Dialog Box doesn't disappear because it's outside of UpdatePanel.

modal popup appears on screen on click of every usercontrol

I have multiple usercontrols in my home.aspx page.In the Header.ascx I have button imgbtnCreateAccount,On Click of this button modal popup appears on screen.
Now apart from this I have Product search User control ProductSearch.ascx.I am retrieving data from database for both the usercontrols. In producdtsearch.ascx page I have label, textbox and submit button.
If I leave textbox blank and press enter,it gives me required field validator which is fine,but when I type something in textbox and press enter it gives me modal popup which should not happen.It appears for all the other usercontrols which is textboxes in it.I have tried adding default button to the panel in which modal popup appears,but still nogo.Also tried changing the text property of imgbtnCreateAccount,still no go.
I also tried to set tetbox property to autopostback=true,but what haapens is that, the background of modal popup blinks for a second and then goes off. Modal popup should only appear on click of imgbtnCreateAccont which is Header.ascx page and nwhile entering tect in any of the textboxes of other usercontrols.Kindly suggest the resolution.
Issue got resolved as i added panel and inside the panel i have div which contains table.there is button in table.i have set the default button property of panel to this button name and the issue got resolved.

ModalPopupExtender OnShow Event

When clicking a button, I have a ModalPopupExtender (Panel) that gets displayed. I can't seem to trigger any event during that process.
Adding an event to the button that opens the ModalPopupExtender doesnt work, as it never triggers. Adding the button as a trigger in my UpdatePanel also doesnt work.
Scenario: I have a gridview with a button outside of the gridview. Clicking the button opens up a ModalPopupExtender which needs to display the checkboxes clicked on the gridview. I have the code to get the checkboxes clicked on the Gridview, however I cant seem to use an event during the process of opening the ModalPopupExtender.

Click Events in Modal Popup Extender

I have a ASP.NET page where a modal popup extender is shown when we click on a link button...There is a submit button in the Modalpopup extender which inserts the data into a DB table.... the proble is there are field validators for the textboxes in the modalpopup extender...for which validation is required...
After entering the values, in the textboxes the submit is working for the second click, but not on the first click...
Can u please help me over.
Thanks in advance
Set the ValidationGroup for the validators and for the Submit button in the popup to the same value, "PopupValidationGroup" or something like that.

Listbox appears through modal popup extender

I have a base page in which i have a listbox.
The base page is also having a modal popup extender.
When the modal popup extender appears over listbox, the listbox appears through modal poup.
That is, only for listbox, the popup extender becomes transparent.
What shud I do for this?
My understanding is that, since listboxes/dropdowns are windows controls, they will always appear over the modal popup.
I haven't tested this, but your best bet may be to write some code in the button click handler that launches the popup and either diable or hide the offending control.

Resources