Problem With RadFormDecorator and Login control

10 posts, 1 answers
  1. Doug Rutledge
    Doug Rutledge avatar
    18 posts
    Member since:
    Apr 2008

    Posted 09 Jul 2008 Link to this post

    It seems after the latest release of the RadControls for ASP.NET AJAX, the ASP.NET Login control acts differently when there is a RadFormDecorator on the page.  Previously, when you enter credentials and hit the ENTER key, the form would submit by default.  After this latest release, when you hit the ENTER key nothing happens.  It seems like the RadFormDecorator does something to the Login button in the Login control that stops it from being the default button for the form.

    Doug
  2. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 10 Jul 2008 Link to this post

    Hello Doug,

    Thank you for bringing this problem to our attention - your points were updated.

    Our initial investigation shows that the problem is related to IE only - it works in all other major browsers, however at this point we cannot tell when we will be able to fix it. For the time being I would suggest the approach shown below. The idea is to set a hidden button on the page that will act like a DefaultButton and hook to its OnClientClick event:

    <form id="form1"  defaultbutton="submitButton" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" Visible="true" runat="server" /> 
        <asp:Login ID="Login1" runat="server"  
         
         LoginButtonStyle-Width="100" 
        OnAuthenticate="Login1_Authenticate"
        </asp:Login> 
         
        <div style="display:none"
        <script> 
        function submitLogin(button) 
        { 
            var loginButton = document.getElementById("<%= Login1.ClientID %>_LoginButton");  
            loginButton.click();             
            return false; 
        } 
        </script> 
        <asp:Button ID="submitButton" runat="server" OnClientClick="return submitLogin(this);"  
        text="Click me"/> 
        </div> 

    I hope this helps.


    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Rutledge
    Doug Rutledge avatar
    18 posts
    Member since:
    Apr 2008

    Posted 10 Jul 2008 Link to this post

    Thank you for the quick reply.  Your work around worked after making one minor adjustment.  I had to add an ASP Panel control around the login control and hidden button and set the DefaultButton property to the hidden button.

    Thanks for the help.
    Doug
  5. Ravi
    Ravi avatar
    3 posts
    Member since:
    Dec 2008

    Posted 25 Feb 2009 Link to this post

    Is this fixed in any version yet? Just curious.
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Feb 2009 Link to this post

    Hi Ravi,

    No, the problem still exists. We still haven't found a solution from our side.

    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Steve
    Steve avatar
    3 posts
    Member since:
    Feb 2009

    Posted 24 Apr 2009 Link to this post

    For those searching, I have found a much simpler way of working around this issue.  Stick this in the page_load event:

     

     

     

    Page.Form.DefaultButton = Login1.FindControl("LoginButton").UniqueID;  
     

     

  8. Mar
    Mar avatar
    25 posts
    Member since:
    Apr 2007

    Posted 21 May 2009 Link to this post

    Any other better resolution to this issue listed here.  I am experiencing the same issue with IE 8.
    Pratik
  9. Steve
    Steve avatar
    3 posts
    Member since:
    Feb 2009

    Posted 21 May 2009 Link to this post

    Did you try adding
    Page.Form.DefaultButton = Login1.FindControl("LoginButton").UniqueID; 
    to page_load?  It works in IE8 for me.
  10. Mar
    Mar avatar
    25 posts
    Member since:
    Apr 2007

    Posted 27 May 2009 Link to this post

    This worked for me.  Thanks.
  11. Brook
    Brook avatar
    2 posts
    Member since:
    Mar 2007

    Posted 17 Mar 2010 Link to this post

    Thanks for posting this work around, I spent a few hours thinking I had set something up incorrectly before I located this post.  It worked for me also.  I am working on a site using adding the Login Control to Community Edition Sitefinity 3.7.2057.3.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017