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

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

ConfirmButtonExtender + ModalPopupExtender inside UpdatePanel: what the hell?

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net

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

View Complete Post

More Related Resource Links

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..

Validation Controls Inside UpdatePanel

Hi All,If you use validation control, the base validator will render script WebForm_OnSubmit() to the page and add form onsubmit "onsubmit="javascript:return WebForm_OnSubmit();". This script is used to fire client side validation event.Now I have a listview inside updatepanel, when click edit button to fire the listview edit mode, the above validation script is just not rendered. How shall I work around with that? I need to customize the client validation event here.Thanks.

UpdatePanel inside a WebPart

I am having problems trying to use an UpdatePanel inside a webpart, the async postback is happening (checked using fiddler and debugging the project to see the events firing), but the contents of the UpdatePanel on the page is not being updated, at the moment all I have in the UpdatePanel is<%=Date.Now.ToString%>To debug it to see if its working, but its not changing, ive tried turning off EnablePartialRendering on the ScriptManager to ensure it works when a normal postback happens and its fine.Any ideas why is not working? Thanks for any help

Ajax ModalPopUpExtender inside ModalPopUpExtender

Hi, 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.Thanks.

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

Problem with Dynamic Controls inside an UpdatePanel

Hello Everybody ,I have this problem,if anyone could help me i'll be so gratefull. I had been created some dynamic radio buttons in a loop inside a dinamy table which is inside an UpdatePanel , but i can not handle the events my code is below:public void MetodoCreacion(){RadioButton RBtn = null;Table table = new Table();TableRow row = null;TableCell cell = null;for (int i = 0; i < 5; i++){row = new TableRow();cell = new TableCell();RBtn = new RadioButton();RBtn.ID = "RBGN_" + i.ToString();RBtn.GroupName = "RBGN1";RBtn.Text = "Opcion " + i.ToString();RBtn.CheckedChanged += new EventHandler(RBtn_CheckedChanged);RBtn.AutoPostBack = true;cell.Controls.Add(RBtn);row.Controls.Add(cell);table.Controls.Add(row);}UpdatePanel1_UpdatePanelAnimationExtender.Controls .Add(table);}public void RBtn_CheckedChanged (object sender, EventArgs e){Label1.Text = ((RadioButton)sender).ID;}and the controls doesent call the event ...thanks a lot

User control inside Updatepanel

Hi,I have a custom control created to autofill the box as typed in. Its working great. But if I put the control inside an Update Panel, it works for the full postback but if partial postback happens (because of the update panel), it does not work. Please advise me. This is very critical for me. Thank you all Kiran

Linkbutton not fire inside the Updatepanel

I have a page with two ajax toolkit popupcontrol extenders, both have a Linkbutton inside the popup window, which is inside a panel and updatepanel. The difference is the second one (Linkbutton2) is inside a Gridview, which is also inside a Updatepanel. The first one works fine, but the second one does not fire when click on it. Please help. The code is as follows: <asp:LinkButton ID="lbnAdd" runat="server" onclick="lbnAdd_Click1">Add New... </asp:LinkButton> <cc1:PopupControlExtender ID="lbnAdd_PopupControlExtender" runat="server" DynamicServicePath="" Enabled="True" ExtenderControlID="" TargetControlID="lbnAdd" PopupControlID="pnlTemplate"> </cc1:PopupControlExtender> <asp:Panel ID="pnlTemplate" runat="server" style="display:none" CssClass="popup_template" Width="499px">asp:UpdatePanel ID="UpdatePanel2" runat="server">  <Triggers>  <asp:PostBackTrigger ControlID = "LinkButton1" />  </Triggers>   <ContentTemplate>table style="width:500px; height: 182px; border-collapse: collapse;">  <tr> <td class="style28">  </td>   <td class="style9">

Button forces postback in updatepanel inside Popup

I have an update panel which is inside a Modal Popup Extender. When I click the Refresh Report button it always calls a postback. I need to stop it from posting back. Ideas?

ReportViewer inside UpdatePanel not working


Has anyone been able to get the ReportViewer to work correctly inside an UpdatePanel?

For me the report renders fine on the initial whole-page refresh, but when I click the next page button the next page renders but doesn't allow me to navigate through the pages anymore. The toolbar says "(blank) of 0" pages and the arrow toolbar buttons for navigating between pages are all disabled.

cannot bind dropdownlist inside from button click inside updatepanel



I have a gridview inside UpdatePanel. 

Inside gridview there is a dropdownlist and a button on each row. On button click I am opening a panel through Modal popup extneder.

Inside that pop up there is again a dropdownlist. I am adding an item into this dropdownlist based on the selection from the dropdown inside gridview. 

like  ddl.items.insert(0,'xyz');

But first time this inserted item is not getting reflected in the dropdownlist. But after one postback this item is getting reflected.

Please let me know how to fix this. I tried UpdateMode conditional and always but didn't worked. If I am not clear let me know.


ConfirmButtonExtender and ModalPopupExtender Server Control with Master Page Failed to find element


I am in the process of building a server control that contains a ConfirmButtonExtender. This is my code:

The Master Page:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="CBC_MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <asp:ContentPlaceHolder id="head" runat="server">
    <form id="form1" runat="server">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Updating an ASP.NET CheckBoxList inside an UpdatePanel from a Javascript function



I have a asp.net listbox server control that is connected to a jquery plugin that can handle a client side click event for each of the checkboxes it renders.

Whenever I click on a checkbox the click event gets triggered and I make a call to

__doPostBack("UpdatePanel1"""); so that i can update the updatepanel and rebind the checkboxlist inside it.

is it possible to do the rebind first, and then update the updatepanel? how do i do that? because now, the rebind happens on the second time i click on the checkbox.




    <script type="text/javascript">
        $(function () {

overflow:auto not working inside updatepanel


Hi all:
I have a div and a css class that gives overflow. but when i add this div inside updatepanel. overflow:auto doesnt work any solution ?
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <div id="mycontent" runat="server">

Problem with Editing image inside DetailsView inside UpdatePanel



I have a problem and I really hope you'll be able to help me.

I'm trying to add and edit an image which is located in a detailsview which is inside an UpdatePanel. After I read relevant topics in the forum I installed the Ajax Control Toolkit. Below is my source code. When I used it only for insert new image it worked great. The problem caused when I tried to implement it on the Edit mode, i.e. when I tried to edit the image and upload a different image.  Unfortunately it didn't work as I hoped. Nothing happend and the image hasn't been changed. I also tried to change the IDs (AsyncFileUpload ID) to be the same in both places but it didn't work either.

The source code:

<asp:DetailsView ID="dvMovie" runat="server" Height="50px" Width="695px"
                    AutoGenerateRows="False" DataSourceID="sdsMovieById"      
                     BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"

ASP Image inside UpdatePanel changing ImageUrl



I have a WebForm which has an update panel. Inside the panel I have an ASP Image. I have also, 2 ImageButtons which act as the triggers for the UpdatePanel.

<asp:UpdatePanel ID="updImage" runat="server">
          <asp:AsyncPostBackTrigger ControlID="btnBackward" EventName="Click" />
          <asp:AsyncPostBackTrigger ControlID="btnForward" EventName="Click" />
          <asp:Image ID="Image1" runat="server" Width="75px" Height="75px" BorderStyle="Solid" BorderWidth="5px" BorderColor="White" />

In my WebForm, I also have an ASP Image component outside the Update panel.

The ImageUrl of those ASP Image components are loaded from a folder that is outside the WebSite root folder, using the code found in this link:


PopupControlExtender inside the UpdatePanel



I have a PopupControlExtender inside of the UpdatePanel. I use it to edit some of the values on the website.

Basicly it looks like this. If you have PopupControlExtender inside of th update panel whenever a user triggers a partial postback javascript creates the popup panels outside of the UpdatePanelControl - to make sure they are always on the top of other elements. So after every postback you get more and more elements with the same clinetIDs.

Here is a code from Firebug - you can notice Panel1 and all the controls inside of it being generated 3 times when i load a page (once) and twice after two partial postbacks:

<form id="form1" action="Test.aspx" method="post" name="form1">
<input type="hidden" value=";;AjaxControlToolkit, Version=3.0.30930.21526, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:pl-PL:c83bc095-c5d9-40da-b175-dc46338fcc3a:865923e8:91bd373d:596d588c:411fea1c:e7c87f07:bbfda34c:30a78ec5:42b7c466;" id="ToolkitScriptManager1_HiddenField" name="ToolkitScriptManager1_HiddenField">


<script type="text/javascript">
var theForm = document.forms['form1'];
if (!theForm
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