Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










AJAX :: Stop ModalPopupExtender From Closing Every Postback?


I've placed a ModalPopupExtender in a WebUserControl to gather and display information to the user. The problem is that, whenever ANY button is clicked, or DropDown control is changed (i.e., anything that causes a postback), the ModalPopupExtender closes. This is not the desired behavior. Taking some advice from a coworker, I've placed a "dummy" button in the Web User Control in the same area of the OK/Cancel buttons, and set its display style to "none". Then I assigned the TargetControlID, OKControlID and CancelControlID to the dummyButton. After that, in the code-behind page I used an UpdatePanel1.FindControl(). FindControl() to delve into and retrieve the ModalPopupExtender, and use its Show() method to start it up. This worked just fine, but even with the OK/Cancel buttons set to a currently non-button, every control that causes a postback closes the modal window. I was also advised to try moving the control containing the ModalPopupExtender out of theUpdatePanel (I'm aware that was just grasping at straws), but this caused a run-time error.I'm am not a super JavaScript guru, and would prefer to find a solution that doesn't require an exhaustive journey into that realm. What I want is to explicitly open and close the modal window via my C# code, and not to have it close every time the user does something in it.


View 6 Replies (Posted: Sep 25, 2008 05:02 PM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
AJAX :: Executing Code Behind After Closing ModalPopupExtender?
It is possible to execute code behind in parent just after closing ModalPopupExtender ?

Posted: Oct 27, 2010 07:04 AM

View 2 Replies!   View Related
AJAX :: Buttons Not Firing After Closing ModalPopupExtender?
I hava an aspx page with a couple of tables and an UpdatePanel on top of the page. Everything on the page works fine until I show (from code-behind) the UpdatePanel (via ModalPopupExtender). The modal works OK after showing, but the problem is that when I close/hide it (using CancelControlID or a custom button with code behind) some control on the page stop firing events.

More exactly one Button and RowCommand on a GridView (both are NOT part of the UpdatePanel).

Here's the UpdatePanel code:

[Code]....

After this code is all the rest of the aspx page - including the Button and RowCommand that stop firing after showing and closing the update panel.

Where's the error?

Posted: Nov 18, 2010 07:26 AM

View 6 Replies!   View Related
AJAX :: How To Stop ModalPopup From Closing
I have a simple example of a ModalPopupwith a panel that appears in the center of the ModalPopup and a couple of buttons in that panel. One of the buttons is a cancel and the other is an OK button. No matter how many other buttons that I add each one closes the ModalPopup. I need to keep the ModalPopup open so that I can run a few calculations then click a close button.

Posted: Sep 01, 2010 04:45 PM

View 5 Replies!   View Related
AJAX :: Stop Closing The Modal Popup
I am not surewhere this error is comming from or even if this is the right place to put this. I have thisevent that fires when I click a link button in the Modal Popup, and yes the link button is set to not cause validation

[Code]....

When this event fires for some reasonthe modal popup window closes. How do I stop this from happening. If you need more code I will gladly provide it.

Posted: Jun 08, 2010 07:13 PM

View 4 Replies!   View Related
AJAX :: ModalPopupExtender Hides After Postback?
I am using the ModalPopupExtender to show a modal dialog. In the dialog I have a Do-Something button performing a very simple operation (copying text between two textboxes which are part of the modal dialog).

Everything is inside a UpdatePanel.

Every time I activate the Do-Something button the Dialog hides !Why ?

Is there a way to make the modal dialog stay between postbacks ?

Here is the ASP.NET code for my Modal Dialog:

[Code]....

Posted: Apr 27, 2007 01:31 PM

View 3 Replies!   View Related
AJAX :: Can't Get Width Or Height Of ModalPopupExtender After Postback
I have a Panel extended by a ModalPopupExtender. Within the panel is a button that uses javascripttodisplay the width of the panel. I have two other buttons: one to show the popup and one to trigger a postback. All the controls sit within an update panel. Before triggeringa postback I can show the popup and the button to display the width works fine. After I cause a postback, though, it always reports 0.Here is the page I have:

[Code]....

Posted: Feb 02, 2010 09:32 PM

View 1 Replies!   View Related
AJAX :: Stop Dropdown List Downloading All In Postback
I've got a dropdown list inside an update panel. Using other controls I change the selected value based upon inputs from code and other places. Is there a way to stop the whole list being redownloaded in every update when i'm only changing the value that is selected. Reason being, is I have a few very very large lists that can take a while to download each time.

Posted: Nov 12, 2009 11:33 PM

View 3 Replies!   View Related
AJAX :: How To Stop Modal Popup From Flickering During Postback
I have the following code that launches a modal popup. When the user types in a value in the popup and hits the save button the popup stays on the screen but it flickers. Is there a way to avoid this?

[Code]....

Posted: Aug 21, 2008 05:20 PM

View 8 Replies!   View Related
AJAX :: ModalPopupExtender: After Postback, Client-side Show() No Longer Works
I'm using what I believe is a pretty common/boring/generic implementation of a ModalPopupExtender. I'm using client-side JS to show the dialog when the user clicks a link, and hide it if they click "cancel". I only do a postback if they truly want to save the data.

I can click the link to show the dialog, then click the cancel button to hide it, then click the link to show it... ad infinitum. If I decide to save the data via a postback, everything works well, and the dialog is hidden as a result of the postback, all as expected.

However, once the postback completes, my client-side JS show() never works again. Any attempts to click the link fail quietly; no error messages, the dialog just never shows again.

Posted: Mar 23, 2010 10:03 PM

View 2 Replies!   View Related
AJAX :: Dynamically Created ModalPopupExtender In GridView Template Is Lost On Postback?
I have a dynamically create modalpopupextender within a template of a GridView. It is dynamically created on the GridView_DataBound() event.When I click the button on the GridView row it invokes the popup correctly. However, when the popup closes, a postback event occurs. Now when I click the button again, the popup doesn't appear. Im guessing this is since the page has posted back without databinding the modalpopupextender that was created as a result of the previous postback, no longer exists? So how do I get round this? If I rebind the gridview in the Page_Load of the postback then all I get is an empty gridview....

Posted: Nov 26, 2008 03:35 PM

View 6 Replies!   View Related
AJAX :: Stop AutoComplete SeviceMethod With Normal PostBack Button?
I have a textbox with an autocomplete extender.The user types in a few chars and usually gets a few to a few hundred suggestions back.And its pretty quick.This is on a formview control at the bottom by the paging. It is for a "Go to" feature.But it is returning the suggestions from the same list of search results from the previous page.(It's really the same page but I just toggle the visibility between the GridView Results and the FormView details).And if they select "All Tickets" its possible to get 5000 results from the search.
Now the autocomplete is really doing the same search as the search results did which is like 46 seconds. And then weeding it down further with the prefix (chars they type in the autocomplete textbox).I have a Return to list button. And I want the Button to interrupt, stop, cancel, abort, or somehow just not wait for the WebMethod to finish, and do a PostBack right away.Since btnReturnToList is a normal postback I can't really use PageRequestManager to check if in async or last postbackelementId or anything.

Posted: Dec 13, 2010 08:05 PM

View 1 Replies!   View Related
JavaScript - Jquery Dialog Stop Closing When Error Occurred
I am using the jQuery Dialog in ASP.NET. I have it working fine with the exception of when I click the OK button in the dialog and if an error occurred I want to show the error in the label. By the time the dialog closing event is fired it is too late. How do I still show the dialog if an error has occurred. I don't want to close the dialog when there is an error.

[code]....

Posted: Oct 15 10 at 20:30

View 1 Replies!   View Related
Stop EIdWinsockStubError, WSACancelBlockingCall Error Appearing When Closing Internet Explorer?
I have an ASP.NET application where one of the pages hosts a 3rd party ActiveX control. A condition can sometimes occur with the ActiveX control that causes the following error message to be displayed in a Windows dialog box when Internet Explorer is closed:

Exception EIdWinsockStubError in module CADVIE~1.OCX at 0029A808.

Error on call to Winsock2 library function WSACancelBlockingCall: Either the application has not called WSAStartup, or WSAStartup failed.Without any intervention from the suppliers of the ActiveX control can I suppress this message.

Posted: Mar 24 at 14:42

View 1 Replies!   View Related
Textbox Always Trigger Postback Event With Autopostback - Stop Postback By Enter Key?
I have 2 textboxes and a submit button inside a .net composite server control. I tried to only postback when submit button is clicked. I set autopostback = false for both textboxes. But either one still trigger submit button's onclick event by hitting "Enter" inside textbox. How can I stop postback by enter key?

Posted: Jun 8 10 at 16:13

View 2 Replies!   View Related
AJAX :: ModalPopupExtender / Datalist Original Image Come In Modalpopupextender After Click
I have aDataList that contains some Thumbnail Image(Image Button).

Now Iwant when i click on any Item in datalist the original image come in modalpopupextender.

How I can do this?

<asp:DataList
ID="dlImgGallery"
runat="server"
RepeatColumns="3"
Width="100%"
onselectedindexchanged="dlImgGallery_SelectedIndexChanged"
DataKeyField="Id"
>
<ItemTemplate><table
style="width:100%;">
<tr>
<td
></td>
<td
class="style3">
<asp:ImageButton
ID="ImageButton1"
runat="server"
ImageUrl='<%# Eval("Img_URL") %>'
BorderColor="#0098DB"
BorderStyle="Double"
BorderWidth="3px"
onclick="ImageButton1_Click1"
/>
</td>
<td
class="style3">
</td>
</tr>
</table><br
/>
<cc1:ModalPopupExtender
ID="mpe"
runat="server"
BackgroundCssClass="ModalBackColor"
TargetControlID="ImageButton1"
PopupControlID="Panel8"
CancelControlID="btnCancel"
ondatabinding="mpe_DataBinding">
</cc1:ModalPopupExtender>
</ItemTemplate>
</asp:DataList>and
my panel that shows as modalpopu
<
asp:Panel
ID="Panel8"
runat="server"
onload
="Panel8_Load">
<asp:Button
ID="btnCancel"
runat="server"
Text="Cancel"
/>
<br
/>
<asp:Image
ID="Image1"
runat="server"
Height="102px"
Width="124px"
/>
</asp:Panel>

Now where I can to write code that when i click on item in datalist Original Image show in modal popup extender?

Posted: Apr 14, 2010 09:50 AM

View 3 Replies!   View Related
How To Prevent Closing Of ModalPopup On Postback
I'm using the ModalPopupExtender control from the AJAX toolkit. This control extends a panel which contains a CreateUserWizard control. However, the validation of the CreateUserWizard control causes a postback to the server, which closes the popup. I'd like the popup to remain open, even after the postback.

ModalPopupExtender
<Panel>
<UpdatePanel>
<ContentTemplate>...</ContentTemplate>
</UpdatePanel>
[code]...

Posted: Feb 3 10 at 2:45

View 3 Replies!   View Related
Web Forms :: How To Postback Work With Closing Browser
I have a quiz pop up aspx page that requires student input answer. If the student closes the pop up browser without answering, it needs to do a postback to server to keep a record in DB.

How should do postback when closing browser?

I use ASP.NET and VC#.

Posted: Sep 18, 2009 01:48 AM

View 9 Replies!   View Related
JQuery :: Prevent Panel From Closing On Postback?
i have some jquery code that I use to toggle a panel (pnlAddBuilding)

In this panel there is a dropdownlist that does an autopostback. When the postback occurs thepanel closes.

How do I keep it open?

[Code]....

Posted: Mar 20, 2011 09:45 PM

View 2 Replies!   View Related
AJAX :: ModalPopupExtender -- Fetch Data In Modalpopupextender
I would really appreciate if someone can find out what's wrong with this code.

Here is my question. I have textboxes in a modal popup extender (City, state, zip) and there is an image button search for searching the address from the database. All this functionality is within a control (.ascx file). This control is added to the page where it needs to be displayed and is being displayed when a user click the Address button (the code for it is not shown here). The method ShowAddressSearch() in the control is being called from the page and it displays the popup.

When the user enters any of the 3 values and hits search a server event is fired up and the result should be displayed in a grid. What is happening is, when the user hits the search button the server call is made and the data fetched from the db but the modal popup closes itself here is the code for this. I would really appreciate if someone can find out where and how popup is getting closed.

[Code]....

Posted: Apr 07, 2010 09:43 PM

View 1 Replies!   View Related
Web Forms :: How To Stop An Upload Pop-up Box From Closing After A File Upload
I have a file upload area and would like to stop the pop-up box area from closing when the user has uploaded their file. Anyone know how I can do this ? this is the code:

[code]...

Posted: Nov 16, 2010 10:44 AM

View 1 Replies!   View Related
Web Forms :: Moving / Closing / Minimizing Of Webparts Without Postback.?
I use partialupdatepanel for async refresh of webparts content. Now i have problem, that after moving of webparts all panels are refreshed. How to avoid it? Can i send data about webparts states to server without any refresh of client side?

P.S. now all webparts zone are in UpdatePanel so user see only refresh of contents inside of webparts.

Posted: Dec 14, 2009 11:52 AM

View 3 Replies!   View Related
C# - ModalPopupExtender Does Not Postback
I have this page where in i have a ModalPopupExtender. Now the panel that shows up as a ModalPopup has 2 buttons namely "Invite" and "Cancel". My problem is that when i click on either of the buttons postback does not occur and i am unable to run my server side code.

When i click on the "Invite" button it simply hides the ModalPopupExtender control and does nothing!!

[Code]....

Posted: Jul 6 10 at 10:49

View 2 Replies!   View Related
AJAX :: How To Stop The Image To Stop Blinking
am using ajax master page and aspx page as main pagein ajaxmasterpage i have the table n in the first row i have kept the image n in the second left column of the table i have placed the hyperlinksand when i am running the mainpage.aspx n clicking the hyperlinks the above image is also getting blinked,so how to stop the image to stop blinking

<%
@ Master
Language="C#"
AutoEventWireup="true"
CodeFile="UserMasterPage.master.cs"
[code]...

Posted: Nov 02, 2009 11:31 AM

View 1 Replies!   View Related
AJAX :: ModalPopUpExtender Inside ModalPopUpExtender
I have a modal popup extender with one control (ascx) this control has a label that on onclic method call other popup extender.

It's has other ascx, it's has a button for a search. When I do Click in this button in first time, the event click not fired and there are a javascript error that say "this._activeDRagVisual is null reference".

In the other hand, If a use de second popup inside an asp page the event and control work correctly. The problem is with the popup inside popup.

Posted: Sep 03, 2010 03:12 PM

View 3 Replies!   View Related
How To Stop Button Postback With If Function
i have a button that will check whether textbox1.text is empty or not. I have put a if function inside the btn_click event and look like this

Code:

If TextBox1.Text <> Nothing Then
''Will COMMIT if everything OK
MsgBox("OK Popup userCon2")
Else
End If

May i know what shpuld be the code inside the else statement if i do not want the button to create a postback and just do nothing?

Posted: Jul 6th, 2010, 12:43 PM

View 3 Replies!   View Related
How To Stop The Whole Page From Executing Again When Doing A Postback
firstly i am not really an ASP.Net developer but i do work in C#.

Anyway one of the application that i develop has an ASP.Net section and i need to amend it.

I want to add a Checkbox which when Checked by the User will set a Session variable.

This Session variable will then be accessed on another page where it will include/disclude some SQL and therefore change the behaviour of a Search.

So i have 2 Pages - Page1 that has the Checkbox on it -

HTML

Quote:

[code]....

1, How do i stop the whole page from executing again when doing a postback ? I only want the Changed Event to run not the whole page

Posted: Sep 27th, 2010, 08:56 AM

View 11 Replies!   View Related
Stop Postback After Using JQuery Dialog?
I have a JQuery Dialog that is opened when a button is clicked. The first time around, it should do a postback, but when the dialog closes and I click the refresh button of the broswer, it sends the data again and duplicates the data I just entered. Should I add a return false somewhere so it doesn't postback when the dialog is closed. Here is the script:

[code]....

Posted: Dec 6 10 at 17:00

View 3 Replies!   View Related
Stop Postback For RadEditor With Spellcheck?
When I use a RadEditor I want to enable the editor's spell check (working thus far). After a spell check the user can either click on the radmodule (toolbar thing) to either "finish spellcheck" or "cancel." Which is all fine and dandy except the "finish" button causes a postback!! I don't want that at this point!! "cancel" more or less does what I want to happen - I mostly just want a "done" or a way to stop the postback.

I've tried an Update panel but that just grays out the text area after it does the update.

Posted: Jul 7 10 at 16:51

View 2 Replies!   View Related
Web Forms :: Stop Postback On TextChanged?
I have a textbox in an aspx page that has a TextChanged event attached to it. I also have a validator attached to the textbox.

When the text is changed, the validate triggers but in case there is an error the textchanged event is still called. Do you know if it's possible to stop the postback on textchanged if the validator fires?

<asp:TextBox
ID="txtQuantity"
runat="server"
AutoPostBack="true"
ontextchanged="txtQuantity_TextChanged"
></asp:TextBox>
<asp:RegularExpressionValidator
ID="revName"
runat="server"
EnableClientScript="true"
Display
=
None
ControlToValidate
="txtQuantity"
ValidationExpression="^d*[0-9]"
ErrorMessage="The quantity is mandatory."
></asp:RegularExpressionValidator>

Posted: Oct 11, 2009 05:58 AM

View 2 Replies!   View Related
Stop Blink Effect During PostBack?
I just have to live with but is there a way to stop the computer screen blinking off and then back on during a PostBack?

This is within ASP.Net and C# and an AutoPostBack operation.

Posted: Feb 15, 2009 04:53 PM

View 3 Replies!   View Related
Web Forms :: Stop PostBack In DropDownList?
I hve few values in my Drop Down List

[Code]....

i want when ever i Select the Value-"Select " it should not postback it PostBack me when ever i Select the value ("Select Again")

can't use Ajax right now other alternative would be javascript

Posted: Oct 19, 2010 09:58 AM

View 5 Replies!   View Related
VS 2008 - Postback Is Clearing Fields - How To Stop This
On my form I have a button that pops up a panel to select an option from. It does a postback to fill in a textbox with the selected data. The other controls such as other textboxes and dropdowns are reset. Any way to stop this? Or do I have to save the settings and set it back on the postback?

Posted: Jun 8th, 2010, 04:40 PM

View 4 Replies!   View Related
Web Forms :: How To Stop Postback On Browsers Refresh
i have simple feedback form on my website, when the user fill the information and submit the button the mail has been sent to the websites address and i have displayd the thans panel after submitting the feedback.

but when i click on the browsers refresh button at that time, the mail is agian resend.. and it will repeat the process that many times that i click the button.

Posted: Dec 02, 2009 04:33 AM

View 3 Replies!   View Related
Web Forms :: If A Textbox Is Not Valid Stop Postback?
i have a textbox where the user needs to type in his phone number and the submit the detials but if the textbox is les than 8 caracters and he or she clicks the button

then it must stop that button doing a post back and refresing the page

is this possible herei an expamle code

[Code]....

Posted: Aug 10, 2010 10:39 AM

View 5 Replies!   View Related
Web Forms :: Stop User Leaving Before Postback?
I have several functions running on a postback that can take a little time to complete.When postback is initiated I show a loading image with this code:

[Code]....

I want to be able to add code to this function so if user tries to leave at this point they are informed the operation is not complete.I found this code:

[Code]....

This works but I only want the code to be active when the loading image is active.I tried the following but it shows the alert message when the page eventually posts back:

[Code]....

Posted: Mar 13, 2011 09:48 PM

View 2 Replies!   View Related
Web Forms :: Stop Postback On Button OnClientClick()?
is it possible to stop postback Button OnClientClick()

[Code]....

[Code]....

[Code]....

so everytime it's displaying me result even if i do postback

thing is that i know i can use validator control's to validate my textbox ,but i am using some custom validations which needs to be checked before submitting of a form.

only that why i m using OnClientClick()

so i want is it possible to Control Postback it should occur only after a OnClientClick() event validationa re truel

Posted: Feb 24, 2011 08:23 AM

View 5 Replies!   View Related
Web Forms :: Stop Button Postback With If Function?
i have a button that will check whether textbox1.text is empty or not. I have put a if function inside the btn_click event and look like this

[Code]....

May i know what shpuld be the code inside the else statement if i do not want the button to create a postback and just do nothing?

Posted: Jul 06, 2010 05:47 PM

View 9 Replies!   View Related
Web Forms :: Prevent A Postback From A Button In User Control Inside A Modalpopupextender
HOW can I prevent a postback from a button in user control inside a modalpopupextender, so that the modalpopupextender doesn't close?

Posted: Apr 12, 2010 10:33 AM

View 4 Replies!   View Related
Is There A Way To Stop The Computer Screen Blinking Off And Then Back On During A PostBack
This may be something I just have to live with but is there a way to stop the computer screen blinking off and then back on during a PostBack ?

This is within ASP.Net and C# and an AutoPostBack operation.

Posted: Feb 15 09

View 3 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved