I have a button defined inside a RadWindow content template that I want to run server code in ajax. The button is inside a RadAjaxPanel. when the server code is run, it could trigger a RadNotification, which is also on the page inside its own RadAjaxPanel.
It all seems to work sort of the first time it's run. The button is clicked and the notification is displayed if necessary. Then the user triggers the window again. I like that the textbox retains the previous value. But when the user clicks the button again, it performs a full page postback, instead of an ajax postback. There is nothing on the page that needs to refresh. Also, how do I keep the window open if the code is going to trigger a notification? Here is the code I'm using:
It all seems to work sort of the first time it's run. The button is clicked and the notification is displayed if necessary. Then the user triggers the window again. I like that the textbox retains the previous value. But when the user clicks the button again, it performs a full page postback, instead of an ajax postback. There is nothing on the page that needs to refresh. Also, how do I keep the window open if the code is going to trigger a notification? Here is the code I'm using:
<telerik:RadWindow runat="server" ID="ForgotPasswordWindow" Modal="True" OpenerElementID="LinkButtonForgotPassword" Behaviors="Close" Title="Reset Password" Height="180px" VisibleStatusbar="False" Width="350px"> <ContentTemplate> <telerik:RadAjaxPanel runat="server"> <div style="margin: 10px;"> <p>If you already have an account and have forgotten your password, please enter the email address for your account in the box provided below. A new password will be emailed to this address.</p> <div> <telerik:RadTextBox runat="server" ID="emailAddress"></telerik:RadTextBox> <telerik:RadButton runat="server" ID="ResetPasswordButton" Text="Submit" OnClick="ResetPassword_Submit"></telerik:RadButton> </div> </div> </telerik:RadAjaxPanel> </ContentTemplate> </telerik:RadWindow> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadNotification runat="server" ID="Notifier" TitleIcon="none" ContentIcon="ok" KeepOnMouseOver="False" Animation="Fade" Position="Center" AutoCloseDelay="2000" ShowCloseButton="False" Height="90" Width="330" VisibleTitlebar="False" Skin="Silk"> </telerik:RadNotification> </telerik:RadAjaxPanel>if (Membership.GetUser(emailAddress.Text) == null){ Notifier.ContentIcon = "warning"; Notifier.Show("The system could not find a user with that email address.");}else ......