I've created a sample application where Site.Master.aspx has all navigations and Login.aspx/Register.aspx etc. are in Account folder.
By default, all menu options are enabled and I don't want all enabled unless user has successfully logged in. Once a user logs in then the Home page should be displayed and the navigation bar should enable "Home", "Contact" and "About".
How do I get it done?
The following is the code for Page.Master.aspx and Page.Master.aspx.c but you should be able to create a default web form application which should give you the same.
Member
75 Points
466 Posts
Site,Master Navigation
Oct 05, 2020 04:21 PM|NJ2|LINK
I've created a sample application where Site.Master.aspx has all navigations and Login.aspx/Register.aspx etc. are in Account folder.
By default, all menu options are enabled and I don't want all enabled unless user has successfully logged in. Once a user logs in then the Home page should be displayed and the navigation bar should enable "Home", "Contact" and "About".
How do I get it done?
The following is the code for Page.Master.aspx and Page.Master.aspx.c but you should be able to create a default web form application which should give you the same.
Member
75 Points
466 Posts
Re: Site,Master Navigation
Oct 05, 2020 05:57 PM|NJ2|LINK
I have assigned an ID (id="myDiv") to DIV but the following code still won't work, I get an Exception "dv was null"
Member
75 Points
466 Posts
Re: Site,Master Navigation
Oct 05, 2020 07:17 PM|NJ2|LINK
OK, I have partially resolved the issue and hide/show the "LoginView" control but still trying to figure out how to do the same for "ulMenu"
The following is what I did to hide/display "LoginView"