Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Aya 7 posts 27 karma points
    May 21, 2010 @ 15:48
    Aya
    0

    Login: hide a part of the page.

    Hi guys!

    I have the login functionality, but now I have a new request. On the public(!) page some content should be visible only for the users that were logged in. Basically it means that a part of the page should be available always and to everyone, a part only for the authorised users.

    Is it possible to do? What do you suggest to use in such a case? 

    Thanks in advance!

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 21, 2010 @ 16:01
    Dirk De Grave
    0

    Hi Aya,

    use asp.net syntax in your public page and check whether member is logged in.

    <%
    if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
    {
    %>
    <!-- part of the page that's only visible to logged on members
    <%
    }
    %>

    Hope this helps.

    Regards,

    /Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 21, 2010 @ 16:02
    Dirk De Grave
    0

    <%
    if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
    {
    %>
    <!-- part of the page that's only visible to logged on members -->
    <%
    }
    %>

    (forgot closing comment tag..)

     

    /Dirk

  • Aya 7 posts 27 karma points
    May 21, 2010 @ 16:27
    Aya
    0

    Wow, thanks a lot!

Please Sign in or register to post replies

Write your reply to:

Draft