.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

ModalPopupExtender and Update Panel - Have to click twice after hiding ModalPopupExtender

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
I am using a ModalPopupExtender that displays an UpdatePanel that contains a custom control.  Whenever someone clicks on the button to show my ModalPopupExtender, after you close the Modal window, the first time you click on anything in the web page it doesn't work.  You have to click a second time to get any links, buttons, etc to work.  It's almost like the modal popup is disabling the page behind it and the page doesn't have focus until you click on something.  I tried just clicking anywhere in the page and that doesn't work.  You have to click on a control that does something.  I confirmed that no matter how many times I load my page and how I load it, it only occurs right after showing the ModalPopup. Example: I click on the button on my form called 'Open Modal'.  It opens the modal window. I click on the 'Cancel' button inside the modal window and it closes.  I select a link inside the page and it doesn't do anything. I click that same link a second time and it fires the click event. I am using AjaxControlToolkit 1.0.10920 Any help would be greatly appreciated. Thanks!

View Complete Post

More Related Resource Links

ModalPopupExtender don´t show panel by code

Hi all,   I´m trying to do a simple thing using asp.net. I wanna show a modal popup panel from a server procedure with vb.net.  The error is: The popup don´t show when I click cmdTest Button. OBS: I used cmdTest just to call the procedure.  In my project, one button call a procedure that will or not call other procedure that will or not show the panel. Can anyone please tell me what´s wrong with the following code ?   Thanks in advance ...   -- aspx --<%@ Page Title="" Language="VB" MasterPageFile="~/Principal.master" AutoEventWireup="false" CodeFile="Autores.aspx.vb" Inherits="Autores" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Button ID="cmdTest" runat="server" Text="Click Here" /> <asp:Button ID="cmdHidden" runat="server" Text="HiddenButton" Visible="false" /> <asp:ToolkitScriptManager ID="ToolkitSc

cancelControlID not hiding ModalPopupExtender with updatepanel

Dear All, after long term searching on google for a solution of my problem, i couldnt find any result, the idea im trying to achieve: 1- create image buttons by reading images from folder 2- add eventhandler on each image button so that it retreaves the sponsor data and display it in datalist + adding trigger on my update panel. the problems are: 1-the code works fine BUT the cancel control id in the modal popup extender not closing the panel. 2- the below code not working with firefox and chrome. the code: NOTE: the script manager in the master page. <%@ Page Language="VB" MasterPageFile="~/MainMasterPage.master" AutoEventWireup="false" CodeFile="testing.aspx.vb" Inherits="testing" title="Untitled Page" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><script type="text/javascript" language="javascript">                    //  register for our events            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);&nbs

ModalPopupExtender allows content panel to show, but everything is disabled

I have a user control (ascx) vs 2010 that contains a modalpopup extender thats popup control is an asp:panel.  In that Panel I have an update panel and a contenttemplate inside the upd panel.  It is a pretty simple example of its use, in that I have list box allowing the users to create a new row in a table.  However, when I click targetcontrol, the background changes to the expended modal background, but instead of being able to use the listbox, everything in the content panel is the same as the background and none of the controls on the panel are enabled.  In other words, the entire page is loaded dimgray, including the updatearea. Not sure what is going on here, but any help would be appreciated.

ajax modalpopupextender panel width in different screen resolution

I have a modal pop up window I want to fix the panel width, but  when screen resolution is changed then panel width is also changed and the content is shown out of pop up window. Is there any way to fix the height and width keep fixed in different screen resolutions ?  

ModalPopupExtender in UpdateProgress Panel



Does anyone know how to get a modalpopup to appear in a updateprogress panel.

I have a page with a list of products, when the user clicks to add a product to cart  I want the modalpopup to appear for as long as the progress takes to addd the item ( to stop the user going to the cart which may still be empty)

I am using a master pages and I have the updatePanel inside a user control, Im trying something along these lines ( as well as a 100 different combinations to get this to work) but cant get it done:

<asp:UpdateProgress ID="upProgress1" runat="server" AssociatedUpdatePanelID="upProductGrid">
                <div id="pnlThink21" runat="server">                        
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/i/loader4.gif" />

ModalPopupExtender Not clearing after update


Hi All,

I hope somebody can help with this issue as I've been struggling for days to work out what I've done wrong. Basically, I have a gridview that I've attached a small pop-up form to edit just the fields that I want editing (rather than all of the fields from the GridView). The update works OK in that the data is written back to the database OK and the pop-up form closes. However, the view of the gridview isn't returned and everything is as though the pop-up form was still there. The only way around it seems to refresh the page.

The front-end is like this:

<asp:Panel ID="Panel1" runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <asp:AsyncPostBackTrigger ControlID="ddlCampaign" />
                <asp:Panel runat="server" ID="grdScroll" Height="380px" ScrollBars="Both">
                    <asp:GridView ID="GridView1" runat="server" 

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

Treeview problems in Update panel



I tried using this code, on a Treeview inside an update panel, which is populated dynamically in code behind. 

However, it doesnt give me the required functionality.

Following is my aspx code for the TreeView and the TreeView populating logic:


<div id="treelist">
<asp:UpdatePanel ID="UpdatePanel1&quo

Accordion Control with Panel...Add an Update Panel?


I have an accordion control in my web site.  And in one of the panels, I have a drop down list box where, when the user selects an item, it updates the labels right below the ddlistbox.  I have it so that it maintains the scroll position when the ddlistbox has an autopostback, but it's very obvious that the whole page posts back.

My question is, can I/should I just enclose the ddlistbox and the labels (and a couple of text boxes) in an AJAX update panel?  I already have a ToolScriptManager (because of the accordion control), so I don't need to have another script manager, right?  I can just put the update panel (with the other controls inside of it) right in the accordion panel, right?  Then when the ddlistbox posts back it won't have the delay of the whole page posting back?  And it'll still execute the event handler for the listbox selection change?

Does this sound right?  I'm just looking to make the post back "invisible", and I would like to do a partial postback of just these few controls.

Thanks in advance! :)

update panel in content page



iam using master page  and i am using update panel in content pages (child pages)

my questions is that can use updatepanel in every child page or  master page only.

give ur suggestions, i have senario , in a page i have file upload concept ,updatepanel

is not support that fileupload.

Wizard in an Update Panel


Hi everybody. Heres the deal. I have a three step Wizard with various textboxes in it. I out the Wizard inside an Update Panel and Content Template. I launch the site and the first step of the wizard is executed nicely but when I click next to get to the second step, nothing happen. If I take the wizard out of the update panel then it works fine.

Any help would be very much appreciated cause I am a bit new in ASP.NET.

Thanx a lot.

Trying to set update panel trigger programmatically


 I have a recursive sub that finds a dropdown list and sets up an AsyncPostbackTrigger for an update panel. I have tried calling this sub both from page_init and page_load 

If the dropdownlist is within the update panel, eveything works fine. If the dropdown list is not in the updatepanel I get error

A control with ID 'ddlPersonFilter' could not be found for the trigger in UpdatePanel 'up1'. In both cases the sub does find the dropdown list and executes the code to set up the trigger. Thanks for your help.

    Private Sub SetUpdatePanelTrigger(ByVal oControl As Control)
        For Each ctrl As Control In oControl.Controls
            If TypeOf ctrl Is DropDownList Then
                If CType(ctrl, DropDownList).ID = "ddlPersonFilter" Then
                    Dim thisddl As New DropDownList
                    Dim thistrigger As New AsyncPostBackTrigger
                    thisddl = ctrl
                    thistrigger.EventName = "SelectedIndexChanged"
                    thistrigger.ControlID = thisddl.ID
                    Exit Sub
                End If
                If ctrl.HasControls Then
                End If
            End If

ModalPopupExtender animated gif not animating


Hi, I'm trying to use the modalPopup extender to show a "processing" message with an animated gif.  Everything works pretty well except that any animated gif I place in the modalextender doesn't animate.  Anyone know of this problem and a solution?


html for the popup div:

<div align="center" style="margin-top: 13px; vertical-align: middle; display: none"

class="modalPopup" id="modalPanel" runat="server">

<table border="0"

Problem with master page and update panel (I think)



the app I am working with is made up of three nested master pages that have the following design:

The first master page ha only realize the HEADER, BODY and FOOTER divs.

The second one specialize the Body content placeholder and divide it in three more layers: NAVIGATOR, PAGE TITLE, BODY CONTENT.

The final layer specialize the BODY CONTENT in PAGE CONTENT and ACTIONS.

In one of my content pages I have (inside the PAGE CONTENT area) 

  • 1 Update Panel that contains a gridview object
  • 1 Update Panel that contains some HTML code to show in a PopupModalExtender

The PopupModalExtender can be either triggered from inside the gridView and also from a series of LinkButtons that are in the ACTIONS area.

The problem is that when the PopupModalExtender shows the FOOTER and the ACTIONS areas are not dimmed from the style I apply as background to the modal popup. An example of what I am trying to explain can be viewed in the following screenshot.

Why this is going to happen? Has anybody any suggestion on how to solve this problem?

Thanks a lot

changing records frm control in update panel


i have a list box, a command button and a grid

when i click a particular record / or multiple records on the  list box and then cclick the command button the records r transferred 2 the grid

i also have custom paging, the paging shld ocur as many times i clcik the command button

i have used updatepanel with the command button in it so that partial postback ocurs or there is no page flicker ,

but when i use update panel i get teh records in the grid but custom page is not working . it has no affect even if the records are added

if i remove update panel the paging works properly

how do i manage it with update panel

Update Panel only doing full postback

I have a page with a TabContainer with 3 tabs.  Within each tab, I have an UpdatePanel.  One of my UpdatePanel's update mode is set to "conditional" and I've added an asyncpostbacktrigger with the controlId="btnClearEmail1" and the eventname="Click".  When I run the page and click the button assigned to the asyncpostback trigger, the page will do a full postback.  Am I forgetting something?  How can I get it to just refresh what is inside the UpdatePanel?  <asp:tabcontainer id="ajaxTabContainer" runat="server"> <asp:tabpanel id="ajaxTabCustomerInfo" runat="server" headertext="Customer Information" visible="true"> <contenttemplate> ... [clipped for brevity] </contenttemplate> </asp:tabpanel> <asp:tabpanel id="ajaxTabSiteBranding" runat="server" headertext="Custom Site Branding"> <contenttemplate> <asp:updatepanel id="UpdatePanel2" runat="server"> <contenttemplate> ... [clipped for brevity] </contenttemplate> </asp:updatepanel> </contenttemplate> </asp:tabpanel> <asp:tabpanel id="ajaxTabEmails" runat="server" headertext="E-mail Notifications"> <contenttemplate> <div> <asp:panel

AjaxToolkit:ComboBox not working in ModalPopupExtender

Hello,I have two nested modal popup. The ComboBox does not work as expected as you can see frome this screenshot. As you can see it misses:The list is not visible even if I think that is in the background. In fact the "SuggestAppend" works perfectly.The ComboBox arrow button is not visible. On zooming the green circle you can see that it shrinked to a size of 4x4 pixelsAdditional info: jquery is used for tabs & datePicker (in the first popup) and Buttons (always)EDIT: Forgot to include  the server side code. Here it is:<ajaxToolkit:ComboBox ID="dataPhoneType2" runat="server" DataSourceID="phoneTypeDS" DataValueField="PhoneTypeId" DataTextField="Description" AutoPostBack="False" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" RenderMode="Inline" CaseSensitive="False"></ajaxToolkit:ComboBox>Is this a bug?Regards
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend