Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Asp Modal Popup:How to prevent from closing

Thread Tools

Asp Modal Popup:How to prevent from closing

arvee2003 arvee2003 is offline
Junior Member
Join Date: Feb 2011
Posts: 1
In an aspx page I have an user control which in turn opens a modal popup which is
another user control.

In the usercontrol in modalPopup I have a check box with a checkedChanged event.

When the checkbox is checked, I check/uncheck all items in a check box list in the user control.

However when the event is completed it closes the modal popup. How do I avoid the modal
popup from being closed. I do not have a modalpopupextender property in user control

I tried using return statement, it does not work.

ANy input is appreciated.


protected void CheckBoxSelectAll_CheckedChanged(object sender, EventArgs e)
        Int32 indexCount = 0, totalCount = 0;
        totalCount = Convert.ToInt32(cblLevelList.Items.Count);
        Control ctrl = (Control)FindControl("ModalPopupExtenderLevel");
        if (CheckBoxSelectAll.Checked)
            for (indexCount = 0; indexCount < totalCount; indexCount++)
                cblLevelList.Items[indexCount].Selected = true;
            for (indexCount = 0; indexCount < totalCount; indexCount++)
                cblLevelList.Items[indexCount].Selected = false;


<asp:Panel ID="PanelLevelHeader" runat="server" style="height:250px;position:absolute;width:320px;text-align:center;" HorizontalAlign="Center">
        <asp:CheckBox  id="CheckBoxSelectAll" runat="server" Text="Select All" 
                 ToolTip="Click to select all Level"
              OnCheckChanged="CheckBoxSelectAll_CheckedChanged" CausesValidation="True" AutoPostBack="True">
         <hr />
          <br /> 
         <asp:Panel ID="PanelLevelDetail" runat="server" style="height:200px;width:320px;margin-top:10px;background-color:#fff; "       ScrollBars="Auto">    
            <asp:CheckBoxList ID="cblLevelList" runat="server" style="height:40px;text-align:left;font-family:Arial,Verdana;font-size:9pt;"  
                    DataSourceID="ObjectDataSourceLevel" DataTextField="rv_meaning" DataValueField="rv_low_value" Height="40px" >      
                   <asp:ObjectDataSource ID="ObjectDataSourceLevel" runat="server"  
                   TypeName="locator_reference_codes" SelectMethod="GetMultiTrainingLevels" >    
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening modal page from modal page Don ASP .Net 0 05-27-2008 11:49 PM
Closing ASP.Net Modal dialog window after serverside event processing alienworkshop Software 0 08-17-2006 08:45 AM
Modal and non modal in same app Leila Java 0 04-26-2005 09:48 PM
post the form data in modal window and close the modal window. Matt HTML 1 06-01-2004 08:22 PM
post the form data in modal window and close the modal window. Matt Javascript 0 06-01-2004 07:47 PM