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

Session State

8 posts, 0 answered
  1. Erik
    Erik avatar
    13 posts
    Registered:
    22 Feb 2010
    23 Mar 2010
    Link to this post
    Hey, I understand that Sitefinity does not use Session State?
    How can I see if a user is logged in or not, and extract the user name of his safe? Coockis not!
    And how can I get a EventID if I put my module on the same page as their Event module is on.
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    23 Mar 2010
    Link to this post
    depending on what membership provider you use you can use the Page.User.Identity.IsAuthenticated property to see if they are logged in and Page.User.Identity.Name to get the username of the sitefinity user.

    getting the EventID is a little trickier, I believe you would have to put your code on the control template for the EventDetails view. are you using an external template?

    if you tell me more about what you're attempting to accomplish, I'll do my best to help.
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    23 Mar 2010
    Link to this post
    Hi SelArom and Erik,

    The easiest way to get the EventID in details mode would be to create a custom control which inherits from EventsView and override the SetItemMetaData method. Then in the control template you can put a literal and set the text of this literal to the event item ID. This will work for master view too:
    protected override void SetItemMetadata(System.Web.UI.Control itemContainer, Telerik.Cms.Engine.IContent contentItem)
    {
        base.SetItemMetadata(itemContainer, contentItem);
        Literal EventID = (Literal)this.FindContentViewControl("EventID", itemContainer);
        if (EventID != null)
        {
            EventID.Text = contentItem.ID;
        }
    }


    Sincerely yours,
    Radoslav Georgiev
    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.
  4. Erik
    Erik avatar
    13 posts
    Registered:
    22 Feb 2010
    23 Mar 2010
    Link to this post
    Thanks so much! Now it works perekt properly when testing cotrolen in admin, but when I run it on the page itself so can not see it that I am logged in doctors even if I logged on I can change records, etc. on the forum. I also tried to add a login control and log on with it, when I type the right password and username is not error. But it goes only to itself without any of the other controls gives some indication that I'm logged in. Only on admin!
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    23 Mar 2010
    Link to this post
    Hello Erik,

    Try adding a Ligin View or Login Status control on the page.

    Kind regards,
    Radoslav Georgiev
    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.
  6. Erik
    Erik avatar
    13 posts
    Registered:
    22 Feb 2010
    23 Mar 2010
    Link to this post
    It's still "Login" button after I return from the login page
  7. Erik
    Erik avatar
    13 posts
    Registered:
    22 Feb 2010
    23 Mar 2010
    Link to this post
    So what could be the issue?

  8. Erik
    Erik avatar
    13 posts
    Registered:
    22 Feb 2010
    24 Mar 2010
    Link to this post
    Found that if I put me. Login status on the same side as the Forum Single Thread is  works. Someone who can imagine why it does not work, but my Forum Single Thread controller on the same page?
Register for webinar
8 posts, 0 answered