This is a migrated thread and some comments may be shown as answers.

Handle RadWindow when browser "back" button click

1 Answer 106 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
HAN MING
Top achievements
Rank 1
HAN MING asked on 26 Sep 2016, 04:06 AM

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

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 26 Sep 2016, 07:18 AM

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.
Tags
WebParts for SharePoint
Asked by
HAN MING
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or