I created a site with anonymous access and forms based authentication. Now I want to show the link to create a new user in the master page when ever no one is signed in. Can any one please help to achieve this process? Following are the screen shots for more details.

|
|
||||
|
|
|
You could add a delegate control and user control to check to your master page, and check if the user is anonymous then show the link :) Add a Delegate control to your master page:
Only thing to note here at this stage is the ControlId attribute - the Feature we create will use this to substitute the real user/server control. Then we have the feature.xml file, where we specify the feature details (including scope):
the 'instructions' for the feature are in the element manifest:
In the COBPageHeader.ascx code-behind, add the logic of hiding link. |
|||||||||
|
|
You can check if the CurrentUser has a LoginName which is not an empty string attached to the SPContext.Current.User object. If the LoginName is null or empty, then the user is anonymous. Code here: http://spdailytips.blogspot.in/2011/09/programmatically-verify-if-current-user.html You can write the code in a delegate control which will be attached to the Master Page. The Delegate Control will check If the user is anonymous, and if yes, push the link to the page. |
|||||
|
|
I have recently made use of this feature, made use of a delegate control to accomplish this |
|||
|