Handle RadWindow when browser "back" button click

2 posts, 0 answers
  1. HAN MING
    HAN MING avatar
    4 posts
    Member since:
    Sep 2016

    Posted 25 Sep Link to this post

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableViewState="false">
           <Windows>
               <telerik:RadWindow runat="server" ID="rdWindowMessage" InitialBehaviors="Resize" Width="700px" Height="400px" Behaviors="None" EnableShadow="true" Modal="true"
                   DestroyOnClose="true">
                   <ContentTemplate>
                       <asp:Panel ID="pnlEventMessage" runat="server">
                           <br />
                           <div class="container">
                               <div class="row">
                                   <div class="col-md-12 text-center">
     
                                       <asp:Image runat="server" ID="imgMessageInfo" Visible="true" ImageUrl="/_layouts/images/mewa_infob.gif" />
                                       <asp:Image runat="server" ID="imgMessageCritical" Visible="false" ImageUrl="/_layouts/images/CRIT_32.GIF" />
                                   </div>
                               </div>
                               <div class="row">
                                   <div class="col-md-12 text-center">
                                       <asp:Label runat="server" ID="lblMessage" />
                                   </div>
                               </div>
                               <div class="row">
                                   <div class="col-md-12 text-center">
                                       <telerik:RadButton ID="rdBtnMessageOk" runat="server" Text="Ok" OnClick="rdBtnMessageOk_Click"/>
                                   </div>
                               </div>
                           </div>
                       </asp:Panel>
                   </ContentTemplate>
               </telerik:RadWindow>
           </Windows>
       </telerik:RadWindowManager>

    Hi, 

    I have implement a RadWindow to display the outcome of a process and there is a "ok" button in RadWindow to close it. 

    When i click on the browser back button, the previous RadWindow  message will show out.

    I like to know is there anyway to stop the RadWindow showing when users click on the browser 'back' button? 

    How should i handle it?

    Thank,

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 26 Sep Link to this post

    Hi,

    This is, most likely, caused by the fact that the code that opens the RadWindow is called again when the page reloads. You would have to either raise some flags (e.g., cookies, session flags, whatever), or find another way to ensure the code does not get executed again. RadWindow itself does not monitor the browser, or the session, and with HTTP being stateless, such behavior is expected.

    Regards,

    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.

Back to Top