Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with popup confirmation page using ModalExtender

Problem with popup confirmation page using ModalExtender

Scheduled Pinned Locked Moved ASP.NET
helpquestionjavascriptcsssysadmin
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nafiseh Salmani
    wrote on last edited by
    #1

    Hey, can anybody help me with this? I have the following code, I put the pop-up related part into an empty webform and that works fine, but in the form that I really want to have that, it doesn't work! there is no error showing what is wrong with this! (the script manager is on the master page). Any note or comments to help me to figure out what is wrong with it?! here is the code:

    /*for user code pop-up */
    .confirm-dialog .base
    {
    BORDER-TOP: #ddd 1px solid;BACKGROUND: url(img/base.png) no-repeat left bottom;
    PADDING-BOTTOM: 4px;MARGIN-LEFT: -11px;MARGIN-RIGHT: -11px;
    PADDING-TOP: 4px;TEXT-ALIGN: center;
    }
    .modalBackground
    {
    background-color:Gray;filter:alpha(opacity=70);opacity:0.7;
    }

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="headerContent" runat="server">
    <script type="text/javascript">
    function Popup()
    {
    var modalPopupBehavior = $find('ModalPopupBehavior1');
    modalPopupBehavior.show();
    }
    </script>
    <style type="text/css">
    .confirm-dialog
    {
    margin-bottom: 0px;
    }
    </style>

    </asp:Content>
    <asp:Content ID="Content1" ContentPlaceHolderID="phBody" runat="server">
    <div class="PageDesc">
    <asp:Localize ID="userCodesPageDescr" runat="server" EnableViewState="False"
    meta:resourcekey="userCodesPageDescrResource1" Text="User Codes enable individual users to arm and
    disarm your security system. Check 'Security Panel Access' to give a user local access so they can arm/disarm
    through the system keypad. Uncheck it to remove local access temporarily - the code will still show
    on the website. (Note that user codes must be 4 digits. Codes 0000 and 0001 are not allowed.)"></asp:Localize>
    </div>
    <div class="PageDesc" align="right">
    <asp:LinkButton ID="lbtnRequestUserCode" runat="server" OnClientClick="Popup()"
    meta:resourcekey="lbtnRequestUserCodeResource1"
    CausesValidation="False">Request Panel User Codes</asp:LinkButton>
    </div>
    <

    B 1 Reply Last reply
    0
    • N Nafiseh Salmani

      Hey, can anybody help me with this? I have the following code, I put the pop-up related part into an empty webform and that works fine, but in the form that I really want to have that, it doesn't work! there is no error showing what is wrong with this! (the script manager is on the master page). Any note or comments to help me to figure out what is wrong with it?! here is the code:

      /*for user code pop-up */
      .confirm-dialog .base
      {
      BORDER-TOP: #ddd 1px solid;BACKGROUND: url(img/base.png) no-repeat left bottom;
      PADDING-BOTTOM: 4px;MARGIN-LEFT: -11px;MARGIN-RIGHT: -11px;
      PADDING-TOP: 4px;TEXT-ALIGN: center;
      }
      .modalBackground
      {
      background-color:Gray;filter:alpha(opacity=70);opacity:0.7;
      }

      <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
      <asp:Content ID="Content2" ContentPlaceHolderID="headerContent" runat="server">
      <script type="text/javascript">
      function Popup()
      {
      var modalPopupBehavior = $find('ModalPopupBehavior1');
      modalPopupBehavior.show();
      }
      </script>
      <style type="text/css">
      .confirm-dialog
      {
      margin-bottom: 0px;
      }
      </style>

      </asp:Content>
      <asp:Content ID="Content1" ContentPlaceHolderID="phBody" runat="server">
      <div class="PageDesc">
      <asp:Localize ID="userCodesPageDescr" runat="server" EnableViewState="False"
      meta:resourcekey="userCodesPageDescrResource1" Text="User Codes enable individual users to arm and
      disarm your security system. Check 'Security Panel Access' to give a user local access so they can arm/disarm
      through the system keypad. Uncheck it to remove local access temporarily - the code will still show
      on the website. (Note that user codes must be 4 digits. Codes 0000 and 0001 are not allowed.)"></asp:Localize>
      </div>
      <div class="PageDesc" align="right">
      <asp:LinkButton ID="lbtnRequestUserCode" runat="server" OnClientClick="Popup()"
      meta:resourcekey="lbtnRequestUserCodeResource1"
      CausesValidation="False">Request Panel User Codes</asp:LinkButton>
      </div>
      <

      B Offline
      B Offline
      Blikkies
      wrote on last edited by
      #2

      Take out "CancelControlID" property and it should work. There are no button with the ID "butConfirmNo"

      N 1 Reply Last reply
      0
      • B Blikkies

        Take out "CancelControlID" property and it should work. There are no button with the ID "butConfirmNo"

        N Offline
        N Offline
        Nafiseh Salmani
        wrote on last edited by
        #3

        Thank, it works! but now I have the problem with button

        butConfirmYes

        , since its onclick event doesn't fire! can anyone help me with this?!

        <asp:Button ID="butConfirmYes" runat="server" Text="Countinue" CssClass="styledbutton"
        meta:resourcekey="butCountinue_userCode1"
        onclick="butConfirmYes_Click1" CausesValidation="False"/

        > and in cs file I have

        protected void butConfirmYes_Click1(object sender, EventArgs e)
        {
        context.SelectedCustomer.Unit.Panel.RequestUserCodes();
        ErrorManager.AddMessage((string)GetLocalResourceObject("Error_CommandSent"));

           }
        
        N 1 Reply Last reply
        0
        • N Nafiseh Salmani

          Thank, it works! but now I have the problem with button

          butConfirmYes

          , since its onclick event doesn't fire! can anyone help me with this?!

          <asp:Button ID="butConfirmYes" runat="server" Text="Countinue" CssClass="styledbutton"
          meta:resourcekey="butCountinue_userCode1"
          onclick="butConfirmYes_Click1" CausesValidation="False"/

          > and in cs file I have

          protected void butConfirmYes_Click1(object sender, EventArgs e)
          {
          context.SelectedCustomer.Unit.Panel.RequestUserCodes();
          ErrorManager.AddMessage((string)GetLocalResourceObject("Error_CommandSent"));

             }
          
          N Offline
          N Offline
          Nafiseh Salmani
          wrote on last edited by
          #4

          I fixed that, thanks. I should delete the

          OkControlID="butConfirmYes"

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups