Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CS Nuglet: If IsAnonymous DisplayCondition fails

A Community Server Chameleon Form I put online this week required that the user be known (logged-in) before permitted to complete or view the form.  So the page has three DisplayConditions, one to test IsAnonymous to display the "you must login..." message, the second DisplayConditions statement to display the form, and a third to display the "thanks..." message on submit with a Chameleon SuccessAction GoToModifiedAction control.

If this weren't a nuglet I'd elaborate on the three different display conditions, but instead I'll toss this cosmic nuglet into the void for anyone who can't figure out why their IsAnonymous DisplayCondition statement is failing.  UseAccessingUser (in bold) ensures that the IsAnonymous condition will be handled correctly.  Otherwise, you don't know what's going to happen.  I'm serious, man, you don't.


<DisplayConditions>
    <CSControl:UserPropertyValueComparison ID="UserPropertyValueComparison1"
        runat="server"
        UseAccessingUser="true"
        ComparisonProperty="IsAnonymous"
        Operator="IsSetOrTrue" />
</DisplayConditions>

Comments (0) | Post RSS RSS comment feed

Posted on 12/31/2007 4:05:14 PM by Dave Burke
Categories: Community Server
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke