Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Show menu only if loged in

  1. #1
    Shampoostore is offline Junior Member
    Join Date
    Jan 2007
    Posts
    15

    Default Show menu only if loged in

    Want to add code to show menu only if a customer is logged in.
    Can this be added to the master file?

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Absolutely.Do the following changes below.

    (1) From {root}/app_code folder, open MasterPageBase.cs file, and add this method:

    Name:  master.jpg
Views: 76
Size:  7.6 KB

    (2) In {root}/App_Templates/Skin_#/temaplate.master file:

    Name:  template.jpg
Views: 75
Size:  111.6 KB

  3. #3
    Shampoostore is offline Junior Member
    Join Date
    Jan 2007
    Posts
    15

    Default Worked great!!!!!

    I used it to show CAT in left menu. Thank you!!!!!

    <% if (IsLogIn)
    { %>
    <aspdnsf:EntityControl ID="ctrlEntityCategory" runat="server" Header="<%$ Tokens:StringResource, AppConfig.CategoryPromptPlural %>"
    EntityType="Category" MaxMenuSize="<%$ Tokens:AppConfigUSInt, MaxMenuSize %>" />
    <% } %>

  4. #4
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    This is such a common request the IsLoggedIn property should be included in the mainline source code for ASPDNSF. This way we don't have to modify it every time we upgrade.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM