RadAjaxManager and ASP Login Control

3 posts, 1 answers
  1. Chon
    Chon avatar
    5 posts
    Member since:
    Nov 2008

    Posted 25 Jan 2010 Link to this post

    I have a simple login page that uses the RadAjaxManager and a ASP login control.  The login control uses a template with two text boxes and a RadAjaxLoadingPanel and a ASP button.  When I set the RadAjaxManager  "EnableAJAX" property to true, the enter key does not work when the user tries to login.  They have to manually click the login button.  But when I set that property to false, everything works as it should.  The user can hit the enter key after inputting the password.  They don't have to manually hit click on the button.  Here is my login.aspx.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="login" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server"
        <title>Login</title> 
        <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script> 
    </head> 
    <body> 
        <form id="form1" runat="server"
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
            </telerik:RadScriptManager> 
            <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" ControlsToSkip="Fieldset" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="true"
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="Login1"
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="Login1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager>     
            <fieldset id="fieldsetlogin"
                <legend></legend
     
                <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/test.aspx" FailureText="<div class='error'>Invalid Login!</div>" OnAuthenticate="Login1_Authenticate"
                    <LayoutTemplate> 
                        <br />                                 
                        <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse"
                            <tr> 
                                <td> 
                                    <table border="0" cellpadding="3"
                                        <tr> 
                                            <td align="center" colspan="3"
                                                <span class="bold gray">Please enter your login information.</span> 
                                            </td> 
                                        </tr>                                                 
                                        <tr> 
                                            <td align="center" colspan="3"
                                                <asp:Literal ID="FailureText" runat="server" EnableViewState="False" Text="&nbsp;"></asp:Literal> 
                                            </td> 
                                        </tr>                                             
                                        <tr> 
                                            <td> 
                                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="loginLabel" Width="100px">User Name:</asp:Label></td
                                            <td> 
                                                <asp:TextBox ID="UserName" runat="server" Width="225px"></asp:TextBox></td
                                            <td> 
                                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="loginLabel" Width="100px">Password:</asp:Label></td
                                            <td> 
                                                <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="225px"></asp:TextBox></td
                                            <td> 
                                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td
                                        </tr> 
                                        <tr> 
                                            <td align="right" colspan="2"
                                                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" IsSticky="true" runat="server" Skin="WebBlue" Visible="true" Transparency="30" Height="35px" BackgroundPosition="Center" EnableAjaxSkinRendering="true"
                                                </telerik:RadAjaxLoadingPanel> 
                                                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Sign In" ValidationGroup="Login1" /> 
                                            </td> 
                                            <td>&nbsp;</td> 
                                        </tr> 
                                    </table> 
                                </td> 
                            </tr> 
                        </table>                                 
                    </LayoutTemplate> 
                </asp:Login> 
            </fieldset> 
        </form> 
    </body> 
    </html> 
     

  2. Answer
    Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 29 Jan 2010 Link to this post

    Hello Chon,

    I am afraid that the Login control is one of the control not compatible with RadAjax for ASP.NET AJAX. You can see the full list of these controls here.
    Additionally, you could try using ASP:UpdatePanel in order to ajaxify the Login control and see if it works thus.

    I hope this helps.

    Sincerely yours,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Chon
    Chon avatar
    5 posts
    Member since:
    Nov 2008

    Posted 29 Jan 2010 Link to this post

    The RadAjaxPanel works as it should... Thanks!
Back to Top