.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

cancelControlID not hiding ModalPopupExtender with updatepanel

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
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

View Complete Post

More Related Resource Links

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

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!

ConfirmButtonExtender + ModalPopupExtender inside UpdatePanel: what the hell?


Yeah, again a topic about ModalPopupExtender funkiness. Sorry about that. But i have the following problem:

When I have a ConfirmButtonExtender and a ModalPopupExtender inside an UpdatePanel, only the first, third, fifth, seventh and so on click on the "yes" button fires a Click event.

What is the cause of this?

And more important, how to solve this thingy?


<asp:UpdatePanel runat="server" ID="UpdatePanel">
                Click the button to change the world. <br />
                <asp:Button runat="server" ID="WorldChangeButton" Text="Test" />
                <ajaxToolkit:ConfirmButtonExtender runat="server" DisplayModalPopupID="mpe" TargetControlID="WorldChangeButton" />
                <ajaxToolkit:ModalPopupExtender runat="server" ID="mpe" TargetControlID="WorldChangeButton"
                    OkControlID="btnYes" CancelControlID="btnNo" PopupControlID="pnlPopup" />
                <asp:Panel runat="server" ID="pnlPopup">
                    <asp:Button runat="server" ID="btnYes" Text="Yes we can!" CauseValidation="fals

How to make my ModalPopupExtender stay in each UpdatePanel refresh?


Hi all,

I have a Gridview which is inside a Updatepanel which is updated through a Timer Control every 5 seconds.
So every 5 seconds I get new data in the rows. I am facing an issue in which I want to display the whole mult-line content of my Textbox(es).
It displays fine but the modal window disappears after the UpdatePanel is updated.

How do I display this pop-up modal window and make it stay while the UpdatePanel continues to update the rows in the background?

Here is part of my code:

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">                               

         <asp:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" />
            <asp:Panel ID="PanelRealtimeLogging" CssClass="Panel" runat="server" ScrollBars="Vertical" >                                                                                   
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="true"


Problems with GridView, ModalPopupExtender and UpdatePanel



I have a strange problem

On one page there is a GridView inside a ModalPopupExtender and this grid is filled through a button inside the UpdatePanel, this button displays the ModalPopup but empty grid (no grid appears) and it does not change the text of lblCantidad

This is the code


 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
<table class="tabla_1" width="900" align="center">
<td class="style13">
<asp:Label ID="Label1" runat="server" Text="Buscar:"></asp:Label>
<td class="style14">
<asp:TextBox ID="txtBusqueda" runat="server" Width="250px"></asp:TextBox>
 <asp:ImageButton ID="imgBuscar" ToolTip="Buscar" ImageAlign="AbsMiddle&q

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

Gridview inside updatepanel


I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..

Wicked Code: UpdatePanel Tips and Tricks


Jeff Prosise explains when it's better to use UpdatePanel and when it's better to use asynchronous calls to WebMethods or page methods instead.

Jeff Prosise

MSDN Magazine June 2007

How do you insert a google map into an ajax updatepanel?


I have built a site that I am using google maps on.  The default page has a google map with info windows containing links and all works great... until a user clicks on the link in the info window.  Doing so takes them to a community page that I have built.  On this community page, I have an ajax update panel that has 2 panels nested inside of it with the visibility set for one to be on and the other off.  The default panel shows community photos, and the second panel I want to show the google map and common directions to the community.  In testing, my buttons to switch the visibility of the panels works great as it should without postback, but when I try to add the map to its panel, it does not show up.  I am new to ajax as well as google maps and I'm not sure why the same code would work fine on my default page but not the community page.  The only obvious thing I can assume is because the community page map is in an update panel.  

How do you insert a google map into and ajax updatepanel and have it work correctly?  Many thanks in advance. 

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick


First post bear with me please:

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help

UpdateProgress with a dummy updatepanel not working


I have a Submit button and some functionality like updating DB and fetching next page in the button click event. This process takes a long time and I want to display a message saying "Progress...." right after clicking the botton. I want to do the same in 20 other pages. So, best way to do it wd be to put the modalpopup MPE or an Updateprogress in a usercontrol or in master page. I first tried putting both of these on the page itself to test and see and neither worked.

I tried using Update progress control with a dummy updatepanel and giving the Submit button as Asyntrigger to the dummy updatepanel. I have also tried using MPE but it didnt work either. Below is an example of what i did..

<asp:UpdatePanel ID="UpdatePanel1" runat=server><contenttemplate><triggers><asyntrigger ID= "Submit"> /> /> />

<asp:updateprogress ID="Progress1" unat=server AssociatedUpdatePanelID="UpdatePanel1"><Progresstemplate>Progress.... />/>

<asp:button ID= "Submit" runat=server >

I have nothing for updateprogress in code behind. Am i missing or doing somethign wrong here? Any help would be appreciated.

UpdatePanel in a Webpart


I'm exploring the usage of UpdatePanels in WebParts for MOSS 2007. The code I have so far for adding a test update panel is this:

                LinkButton goButton;
                goButton = new LinkButton();
                goButton.ID = "butGo";
                goButton.Text = "Go";
                goButton.Command += new CommandEventHandler(goButton_Command);
                goButton.Click += new EventHandler(goButton_Click);

file upload in Create User Wizard Created User event with UpdatePanel Tag wont work?



In my Create User Wizard1 Created User Wizard Event, I am collecting extra information from text boxes and allowing

the user to uplad a file.



I have put the Submit button within an Update Panel Tag but since I have done this it does not work.

Is there a way round it. In this situation would you use a trigger.?


<br />

  <asp:UpdatePanel ID="UpdatePanel2" runat="server">

  <asp:Button ID="StepNextButton" runat="server"  CommandName="MoveNext"  align="middle"
                                            Text="Submit my Profile" />

Total newbie question: Calling jQuery in an UpdatePanel?



Please forgive this ignorant question - I've used ASP.NET AJAX a good deal but I'm new to jQuery.  Specifically, is it possible to call or create jQuery events on the fly via an UpdatePanel?  For example, calling a jQuery modal or animating a Label (or <div> contained Literal), etc.

If anyone has any advice or could point me to some easy tutorials on mixing ASP.NET AJAX and jQuery, I'd greatly appreciate it. 



Hiding url


 I have a folder where documents are stored and a user can access these documents based on thier role.  The page come up www.name.com/folder/documentName.pdf


How can I get the url to display www.name.com/folder ?

Calendar hiding the last item in a day


Has anyone run into this? We have a calendar that, only on the 8th and 9th of the month, fails to show the last item:

It shows the hyperlink for "1 more item", but when you click it, it remains at "1 more item", rather than changing to "collapse". After verifying, there is one more item in the list that isnt getting displayed.


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