1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Remember Me not working when RadSearch is used

Remember Me not working when RadSearch is used

4 posts, 0 answered
  1. Luc Baeten
    Luc Baeten avatar
    169 posts
    Registered:
    23 Sep 2005
    15 Sep 2008
    Link to this post
    Hello Telerik Team

    In a website I am using a login control and a rad search control together in one (master)page. For readability I defined a very basic login.aspx:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
    <%
    @ Register Assembly="Telerik.Search" Namespace="Telerik.Search.WebControls" TagPrefix="radSearch" %>
    <%
    @ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="cc1" %>

    <!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></title>
    </
    head>

    <body>
    <form id="form1" runat="server">
    <radSearch:SearchBox ID="uxSearchEnglish" runat="server" IndexCatalogue="HRCSearch" LayoutTemplatePath="~/ControlTemplates/Search/SearchBox.ascx">
    </radSearch:SearchBox>

    <div id="loginBox">
    <h2><asp:Literal ID="Literal2" runat="server" Text="Login"></asp:Literal></h2>
    <asp:Login ID="Login1" runat="server" DestinationPageUrl="Admin/Default.aspx">
    <layouttemplate>
    <fieldset>
    <p class="failure"><asp:Label runat="server" id="FailureText" enableviewstate="False" style="color:Red" /></p>
    <ol>
    <li><cc1:FieldLabel ID="lblUsername" runat="server" TargetID="UserName"><asp:Literal runat="server" Text="Username"></asp:Literal>:</cc1:FieldLabel><asp:textbox runat="server" id="UserName" accesskey="u" CssClass="login" /><asp:requiredfieldvalidator runat="server" id="UserNameRequired" controltovalidate="UserName" validationgroup="LoginBox" ErrorMessage="*" tooltip="UsernameEmpty" CssClass="validator" /></li>

    <li><cc1:FieldLabel ID="lblPass" runat="server" TargetID="Password"><asp:Literal runat="server" Text="Password"></asp:Literal>:</cc1:FieldLabel><asp:textbox runat="server" id="Password" textmode="Password" accesskey="p" CssClass="login" /><asp:requiredfieldvalidator runat="server" id="PasswordRequired" controltovalidate="Password" validationgroup="LoginBox" ErrorMessage="*" tooltip="PasswordEmpty" CssClass="validator" /></li>

    <li class="check"><asp:checkbox runat="server" id="RememberMe" /><cc1:FieldLabel ID="lblRemember" runat="server" TargetID="RememberMe"><asp:Literal runat="server" Text="Remember me"></asp:Literal></cc1:FieldLabel></li>

    <li class="submit"><asp:Button ID="LoginButton" runat="server" CommandName="Login" CssClass="CmsBut" ValidationGroup="LoginBox" Text="LoginCaps"></asp:Button></li>

    </ol>
    </fieldset>
    </layouttemplate>
    </asp:Login>
    <address>Copyright © 2006-2008 Telerik. All rights reserved.</address>
    </div>
    </form>
    </
    body>
    </
    html>


    When I use this login.aspx without the radsearch control the Remember me functionality of the login control is working: this means when I type in the username, the password is filled in automatically.

    However when I use the page with the radsearch control the remember me functionality doesn't work anymore.
    This problem occurs in IE 7 , not in Firefox.

    It there a way to solve this when using both the controls in one (master)page?

    Kind regards
    Luc
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    24 Sep 2008
    Link to this post
    Hello Luc Baeten,

    The described issue is not related to the Search control. We have reproduced this behavior both with the Search control on the master page and without it (for example Sitefinity login page behaves in the same way in IE7). To solve this issue you need to configure AutoComplete settings in Internet Explorer 7:
    1. Open Internet Explorer.
    2. Click Tools and select Internet Options.
    3. Select the Content tab.
    4. Click the Settings button under AutoComplete.
    5. Check the option that says "Prompt me to save passwords".
    6. Click OK.
    Best wishes,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Luc Baeten
    Luc Baeten avatar
    169 posts
    Registered:
    23 Sep 2005
    25 Sep 2008
    Link to this post

    Hi Pepi

    I know this setting and it is configured in my IE7 browser. The fact is: when I remove the RadSearch from the example source I send you in my earlier post, IE7 asks me to save the password and afterwards it is automatically filled in (Remember me functionality does work in that case).
    So I believe it has nothing to do with this setting.

    Regards
    Luc

  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    01 Oct 2008
    Link to this post
    Hi Luc,

    It seems that when you declare ASP.NET Login control on the same page with a text box control, "Remember me" functionality does not work on IE (the issue is not specific for the Search control). The solution is to implement this by yourself:
    1. Save the password in a cookie on the server
    2. Get the value of the cookie on the client using javascript and set it for the password text box

    Do let us know if you need any further assistance on this.

    All the best,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered