.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

Modal popup extender will not open again after cancel

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

I'm struggling with getting my modal popup extender to behave as I want it to.
The problem is as follows:

To add a new post to my database, I click my button "Ny melding" (btnAdd_Click).
My popup shows, all OK. But in case I want to abort this new post, so I click "Avbryt" in the footer (btnClose_Click).

If I then click "Vis/Endre" in my gridview gvMeldinger (btnViewDetails), my modal popup doesn't pop up again.

And even if I now try to add a new post by clicking "Ny melding" (btnAdd_Click), this doesn't work.

Am I missing something essential and basic stuff here??
Do I need to empty any buffer/cahce, or reset my global variables MidlerTB (TextBox(, Midler (String) and NyDatoStreng (String)??
And in case yes - how do I accomplish this??

Thanx in advance.

Outtake from my code in my aspx file:

        <asp:Table ID="Table3" runat="server" Height="350px" Width="60%">
                <asp:TableCell Width="100%" BorderStyle="Solid" VerticalAlign="Top" CssClass="gjoremal">

View Complete Post

More Related Resource Links

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

Modal Popup Extender and an Update Panel - "Cancel" Button problem


This should be a quick "yes" answer - I am in the process of creating a very simple test, but I thought I'd ask on here too (also, so other people might be able to find the answer, if they have the same problem).

I have created a modalpopupextender that opens up a panel containing an update panel.  I have a cancel button that is tied into the MPE's [CancelControlID] property and this closes the popup when I click it.  However, if I perform a partial postback within the update panel, the cancel button no longer works.  I have found an example online that seems to imply that the cancel button (and I'm guessing, by association) and the OK button should be outside the update panel.  Does the partial postback break the buttons' client script bindings, and thus should they always be placed outside the update panel?

Modal Popup extender

HEllo I m using modal popup extender well i m having page on the page i m showing modal pop up extdner on click on every button but my problem is if scroll the page then modal popup extender aslo scroll till end I dont want modal popup up extender to be scoll according to page scroll can u help me pls?  

View Source When Modal Popup Extender is Displayed

I've got some Javascript within a div that's displayed by a Modal Popup Extender. The Javascript is throwing an error. When I go to 'View Source', it appears that the source for the Modal Popup Extender and the Javascript contained therein isn't there. How can I view the source then? The Modal Popup Extender *is* being rendered.

Modal Popup Extender: Jscript Runtime Error

I have a master detail aspx page with modal popup. The modal popup has a formview with edit and insert options. Whenever I try to show or hide the popup it always gives the following error. If I ignore it just works fine. Any reason why is this error popping up. Once when I deleted all the breakpoints and debugged it, the error did not show up Error:       Microsoft JScript runtime error: SysArgumentNullException: Value cannot be null       Parameter name:elements. I do not where the error occurs. It shows a break some where as follows: Debug Script Section --------------------------- Sys.UI.DomEvent.prototype = {     preventDefault: Sys$UI$DomEvent$preventDefault,     stopPropagation: Sys$UI$DomEvent$stopPropagation } Sys.UI.DomEvent.registerClass('Sys.UI.DomEvent');     $addHandler = Sys.UI.DomEvent.addHandler = function Sys$UI$DomEvent$addHandler(elements, eventName, handler, autoRemove) {     /// <summary locid="M:J#Sys.UI.DomEvent.addHandler" />     /// <param></param>     /// <param></param>     /// <param></param>     /// <param optional="true" mayBeNull

modal popup extender..session timeout

hi, i actually want to give a popup 2 min before the session timeout, i have actually found out a way to do that but i want to use modal pop up extender instead of javascript....... how should i use this,how do i create the pop up window first and then how do i call it from page load of each page, what should be the targetcontrolid,please help me out.   thank you

Ajax Modal Popup extender



I have an ajax modal popup extender in update panel.  The modal popup extender has a label , checkbox and a dropdown list. When i open the popup first time (i.e Page_load) and select something and click on ok the data is populated correctly in another grid. If i open the popup second time and select some data and click on ok  it is populating the grid with the current selected data as well as previously selected data. Please provide me with the solution with this issue..




Modal Popup Extender server side Show() does not work


Hello. Im using a modal popup extender to tell my user that the page has successfully been updated and then redirect them to a new page with the ok button. The thing is that i do NOT want this extender to fire when i press the button. I would rather call the Show() function myself. Right now i have a simple test page with a button that calls the popup extender Show() function but Nothing happens. If i set the targetID to the button it works but Im not able to call it through codebehind.

Any thoughts?

<%@ Page Title="" Language="C#" MasterPageFile="Master.master"

how activate modal popup extender on some condtion.


i want to know how to activate modal popup extender only on some condition and that to on button click



activate modal pop up


can any body help me

javascript window.history.back() issue with Modal popup extender



I have a asp.net page that has a list of items. When one of the items from the list is clicked a details page is displayed. This details page has a link button to show a popup for history of the item. The details page also has a button with text 'Back'.  The back button has onclick event set to  "javascript:window.history.back();".

This back button works fine and goes back to the first page. However when the user is on the second page and opens the pop up by clicking on the link button, the back button stop working and displays Webpage has expired message.

Any help would be appreciated.




How can I open an InfoPath Form in a modal Windows or Popup from inside another InfoPath Form


Hey guys, I need some help, please. How can I open, in a modal windows or pop up, an InfoPath form from inside another InfoPath form using a button or maybe a link. I need to be able to have both forms on the screen.

How can I do that? Can I use jQuery?

Help, please.

Thanks in advanced!

Modal Popup Extender


hi all

how can i add multiple targetcontrolids to a modal popup extender..


Modal PopUp Extender with DataBound DropDownList



I've build a Modal Popup extender with a DataBound DropDownList. The only problem I've got is that the DropDownList is being filled in the Page_Load. Even when I put the binding in the Load of the Modal PopUp extender there is no data inside my Dropdownlist.

What am I doing wrong here? Because everything should work when I hit the TargetControlID. Can anyone help me out here?

thanks in advance. 

Modal Popup Extender postback problem?



When i try to submit the page which has modal popup extender,popup extender becomes visible! How can i avoid this?

Thanks in advance.

Modal PopUp Extender Dynamic Content



How can i make modal popup extender dynamic size which is populated by SqlDataSource???

Here is the code below ;

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="lblPopupTargetID"
                        PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" />
                    <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Width="450px" Height="300px">
                        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                <asp:GridView ID="GridView1" DataSourceID="SqlDataSource2" runat="server" AutoGenerateColumns="False"
                                    Width="450px" Height="300px" AllowPaging="true" PageSize="10">
                                                <asp:Button ID="btn" runat="server" Text="Select" CausesVa

showing progress bar right after closing Modal Popup Extender



i have a question, i have a list box with a button below that, when user click on the button

modal popup will open (created by Ajax modal Extender ) then user enter somthing on the text box and click on the save

next, modal popup will close , and user can see his/her added item in the list box,

how can  i add some progress bar showing 3 to 5 seconds progress right after closing modal popup window?

my code has enclosed:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MainSystem.aspx.vb" Inherits="MainSystem" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  <style type="text/css" >
        .modalBackground {
<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>Main System</title>


Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.
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