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

Problem With RadFormDecorator and Login control

9 Answers 349 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Doug Rutledge
Top achievements
Rank 1
Doug Rutledge asked on 09 Jul 2008, 06:52 PM
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

9 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 10 Jul 2008, 01:40 PM
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
0
Doug Rutledge
Top achievements
Rank 1
answered on 10 Jul 2008, 03:55 PM
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
0
Ravi
Top achievements
Rank 1
answered on 25 Feb 2009, 08:26 PM
Is this fixed in any version yet? Just curious.
0
Georgi Tunev
Telerik team
answered on 26 Feb 2009, 07:57 AM
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.
0
Steve
Top achievements
Rank 1
answered on 24 Apr 2009, 08:25 PM
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;  
 

 

0
Mar
Top achievements
Rank 1
answered on 21 May 2009, 02:13 PM
Any other better resolution to this issue listed here.  I am experiencing the same issue with IE 8.
Pratik
0
Steve
Top achievements
Rank 1
answered on 21 May 2009, 02:29 PM
Did you try adding
Page.Form.DefaultButton = Login1.FindControl("LoginButton").UniqueID; 
to page_load?  It works in IE8 for me.
0
Mar
Top achievements
Rank 1
answered on 27 May 2009, 10:04 PM
This worked for me.  Thanks.
0
Brook
Top achievements
Rank 2
answered on 18 Mar 2010, 03:02 AM
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.
Tags
FormDecorator
Asked by
Doug Rutledge
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Doug Rutledge
Top achievements
Rank 1
Ravi
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Mar
Top achievements
Rank 1
Brook
Top achievements
Rank 2
Share this question
or