More in this section

Login Control

24 posts, 0 answered
  1. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    27 Dec 2008
    Link to this post
    I wonder what I am doing wrong. I put a template up that is a general template for things such as login, registration, password recovery. I put the login control on my Login page in Site Finity and tried to set some properties so it would fit the look and feel of the site. None of the properties I set, worked. It still remained the same in display and in the live site. Any idea why this control is like this? I have not checked registration but I wonder if I have somethign that is causing problems with the properties of my controls not changing.
  2. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    28 Dec 2008
    Link to this post
    Did you define and set a theme?  You should use the Sitefinity theme mechanism to set the look and feel of pages, and use Master Pages to govern the layout.  Templates are an abstraction that allows you to instance master pages differently for different groups of pages.  And a Template is associated with a theme.  There's probably other aspects too, but that's how I think of them.  Themes are a bit tricky to figure out at first.

    I think you're going to have to make some pretty significant changes to your existing site as you implement Sitefinity.  I've never really built sites quite like this before, which is odd when I think about it, as Sitefinity is basically straight-ahead ASP.NET. 

    Regards,
    Mike Sharp
  3. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    29 Dec 2008
    Link to this post
    Yea I have that all working for the other pages in my site. The properties I am setting are not even theme related, they are things like Width and Height.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    29 Dec 2008
    Link to this post
    Hello Armysniper,

    Thank you for using our services.

    Please open the Login control(~/Sitefinity/UserControls/Login/LoginControl.ascx ) and remove the template(  <LayoutTemplate> </LayoutTemplate>) from the ascx. This will fix the problem and you will be able to edit all properties of the control.

    I hope this helps.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    29 Dec 2008
    Link to this post
    Just one suggestion to add...Make a copy of that control and put it in a subfolder or your usercontrol folder.  Then change the registration to point to the new location, or add the the control to your web.config <toolboxControls> (depending on how you're using it).  That way subsequent Sitefinity upgrades won't overwrite your changes. 

    Regards
    Mike Sharp
  6. Pat
    Pat avatar
    20 posts
    Registered:
    18 Feb 2003
    04 Feb 2009
    Link to this post
    Hello Ivan,
    I removed the <LayoutTemplate> </LayoutTemplate> from Login control (~/Sitefinity/UserControls/Login/LoginControl.ascx). But now I'm getting this failure:
    'System.Web.UI.WebControls.Login' does not have a public property named 'h3'

    Regards,
    Patrick
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Feb 2009
    Link to this post
    Hi Patrick Brill,

    Please make sure that the control template looks like the example below demonstrates:

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginControl.ascx.cs" 
        Inherits="UserControls_FinalLoginControls_LoginControl" %> 
     
    <asp:Login ID="Login1" runat="server"
    </asp:Login> 

    I hope this helps.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    10 Feb 2009
    Link to this post
    Has this been changed in 3.6?
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Feb 2009
    Link to this post
    Hi Armysniper,

    The control has not be changed yet. Removing the template will allow you to set the properties. Control functionality will not we affected. We use the Login control.

    Let us know if there is anything else that we can do for you.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  10. HealthRx
    HealthRx avatar
    3 posts
    Registered:
    03 Aug 2007
    24 Feb 2009
    Link to this post
    I appreciate the hard work that goes into such a complex product, but I must have this wrong.  Are you saying that you shipped the product with a login control that does not work without searching the forum for how to edit it?  Is there a way we could know of these things a little more directly to save time?

    Best regards,

    Patrick
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Feb 2009
    Link to this post
    Hi HealthRx,

    Thank you for your feedback.

    The problem has been logged as a bug and we will try to fix it as soon as possible.

    Sincerely yours,
    Ivan Dimitrov
    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.
  12. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    05 May 2009
    Link to this post
    I am having problems where this control does not even RESPOND to login. I created a new login.aspx page, added the Login control and then when I try to login, it does nothing. Does not login does nothing when I click Login button. Here is how my web.config looks:

    <authentication mode="Forms">
          <!--<forms name=".ASPNET" loginUrl="~/sitefinity/login.aspx" protection="All" timeout="1440" path="/" />-->
          <forms name=".ASPNET" loginUrl="~/login.aspx" protection="All" timeout="1440" path="/" />
        </authentication>

    I commented out the built in one and just made a copy of it and used the new login page. Again I am using YOUR controls so its nothing new. I tried creating my own which is basically a styled version of the Login control that ASP.NET came up with, it too does nothing. HELP!!!!! My site is going live soon!
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    05 May 2009
    Link to this post
    Hello Armysniper,

    Login control has a property "DestinationPageUrl" that you could set to redirect your after you have authenticated. More information at MSDN

    Regards,
    Ivan Dimitrov
    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.
  14. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    05 May 2009
    Link to this post
    I would if it actually did something. Here are the steps I did:
    1. Create Login Page and assign it a template (template is a base template for system stuff).
    2. Add the Login control from the Site Finity controls.
    3. Publish page.
    4. Directly navigate to http://localhost/MyProject/Login.aspx.
    5. Type in the admin credentials. Click Login.

    Nothing happens. No properties changed, nothing. I created my own version of the ASP.NET login control, added it to the controls and tried steps above. Nothing. I created a DEFAULT2.ASPX page in root and ran that as the startup of the site, added my login control, works fine. Just does not work with Site Finity.
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    05 May 2009
    Link to this post
    Hello Armysniper,

    After you type your credentials the page should do a post back. The control declaration can be found at ~Sitefinity/UserControls/Login/LoginControl.ascx. You can check whether you have not altered something there. I am attaching the control for your convenience.

    I am not able to reproduce the problem you reported.

    Kind regards,
    Ivan Dimitrov
    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.
  16. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    06 May 2009
    Link to this post
    There are no differences between the version I am using and the one you mailed. As I said, either version I use (mine or yours) it does not work, which makes me think this is a config issue. How can I mail you guys my code?
  17. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 May 2009
    Link to this post
    Hello Armysniper,

    Thank you for getting back to me.

    You ca open support ticket and attach your control and web.config file as well.

    Greetings,
    Ivan Dimitrov
    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.
  18. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    14 Jul 2009
    Link to this post
    Was there any progress on this?  I am having the same issue.  I have copied the Login control from the sitefinity/usercontrols/Login folder into a new folder in the root/usercontrols folder so I can make some custom code.  The login control does nothing.  No post back.  Any thoughts?  It is the same exact code as the sitefinity control.
  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Jul 2009
    Link to this post
    Hello Josh,

    The code was related to the customer code. The behavior could happen if you are using IE 8. If the problem persist, please send us the code you are trying to use.

    Sincerely yours,
    Ivan Dimitrov
    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.
  20. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    15 Jul 2009
    Link to this post
    This is what I have.  Yes, I am using IE8, but what I dont understand is that the code works in the other control, but the new control doesnt work.

    LoginControl.aspx
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginControl.ascx.cs" 
        Inherits="UserControls_FinalLoginControls_LoginControl" %> 
    <asp:Login ID="Login1" runat="server">  
        <LayoutTemplate> 
            <h3>Login</h3> 
            <fieldset> 
                <ol> 
                <li> 
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label> 
                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                        ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator> 
                </li> 
                <li> 
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label> 
                    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                        ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator> 
                </li> 
                <li class="checkbox">  
                    <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." /> 
                </li> 
                </ol> 
                <p> 
                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal> 
                </p>                
                <p> 
                    <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$Login1" /> 
                </p> 
            </fieldset> 
        </LayoutTemplate> 
    </asp:Login> 
     

    and LoginControl.aspx.cs
    using System;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
     
    public partial class UserControls_FinalLoginControls_LoginControl : UserControl  
    {  
        void Page_Load(object sender, EventArgs e)  
        {  
        }  
     
        public Login Login  
        {  
            get 
            {  
                return this.Login1;  
            }  
            set 
            {  
                this.Login1 = value;  
            }  
        }  
     
     
    }  
     


    Thanks for the help!
  21. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Jul 2009
    Link to this post
    Hi Josh,

    It is the standard asp.net Login control. I cannot reproduce any problems with this code under FF and IE 7.

    Kind regards,
    Ivan Dimitrov
    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.
  22. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    15 Jul 2009
    Link to this post
    Josh the issue I ran into was with a piece of code added by my content authors that had a FORM tag in it. They wanted a subscription piece for ConstantContact newsletters so they added it in on their own. That form tag would consume ANY postback events of buttons. The test for your control is if you get any VALIDATION events that occur when you use the Login control. If they work, then make sure you have code in your templates or elsewhere that does not contain a SECOND form tag. You are only allowed one.

    The issue is NOT related to the browser except that IE8 does not allow this kind of code to pass through...Firefox is less strict.
  23. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    15 Jul 2009
    Link to this post
    ArmySniper, thanks for the response.  That makes a decent amount of sense.  The issue for me is that why does the supplied control work, and the copied one not work?  Is there a config setting or something I am missing?
  24. Josh
    Josh avatar
    19 posts
    Registered:
    24 Jun 2009
    15 Jul 2009
    Link to this post
    I have said it before and I will say it again - I am an idiot.

    One of the other guys on the team had added in a login control in the footer, and Armysniper was correct.  There was multiple form tags on the page so the postback wasnt firing.  Thanks guys!
Register for webinar
24 posts, 0 answered