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

Forums / Designing with Sitefinity / Styling the Login Control

Styling the Login Control

4 posts, 1 answered
  1. olav
    olav avatar
    76 posts
    Registered:
    22 Jan 2007
    28 Apr 2010
    Link to this post
    Hi,
    I have added a page and added a Login Control. I also pointed the forms login to that page in web.config. Operation is ok. (except for a minor issue with redirecting, I need to use full URIs if parametrized, not mysite/apage?param=a, but mysite/apage.aspx?param=a)

    But settings that I change in this Login Control have no visible effect. I also try some css styling from the theme main stylesheet, but the text boxes remain offset and the entire control looks quite "unstyled".

    I guess I'm missing something obvious. Just wanted to check elsewhere before struggeling any more.
    Is there a better way to style this control?

    Thanks for any help.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    28 Apr 2010
    Link to this post
    Hello olav,

    • The default login control does not implements logic for return url and using parameters as QueryStrings. you could implement logic to append QueryStrings in the url inside Login1_LoggedIn where you make Resonse.Redirect to a ReturnUrl string redirectUrl = Request.QueryString["ReturnUrl"];
    • You could take a look at MSDN to gather more information about how to change the visual appearance of the control.
    Let us know if there are further questions.
    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. olav
    olav avatar
    76 posts
    Registered:
    22 Jan 2007
    28 Apr 2010
    Link to this post
    Thanks Ivan,

    Well, the Sitefinity Login Control definitely seems to handle redirecting with query strings, at least as long as I provide full URIs. No problem if the support is not official, we can handle that for now. (yet another item on the list of things not to bother with until Sitefinity 4.0!)

    The MSDN article was good, but less relevant right right now since we were going to use the template/css approach.
    I created a copy of the \Sitefinity\UserControls\Login\LoginControl.ascx, altered markup and applied css. Task accomplished.

    Still, I tried to alter some settings of the Login Control instance using the Sitefinity property dialogs. Same problem, I can not alter any settings (e.g. changed text for UserNameLabelText, text never changes).
    I have experienced similar "missing behavior" with other controls. It is a bit annoying to be programming just to alter small design details, it would be very convenient if the web editors could alter properties of all controls, for those single occurrences.

    A bug? Something we do wrong?
    Thanks again.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    28 Apr 2010
    Link to this post
    Hi olav,

    There is a bug with setting some of the second level properties, so they have to be exposed on the first level. In our template UserNameLabel is directly hardcoded into the HTML markup

    <fieldset>
                <ol>
                <li>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>

    You could remove the hardcoded value and expose a public property "UserNameLabel" which you will use to set the UserNameLabel.Text  from the ControlDesigner.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
Register for webinar
4 posts, 1 answered