Another Update to the CardSpace Control for ASP.NET

Update: updated version here.

I did another slight modification to my CardSpace control (see here and here) – it now fires a TokenSubmitted event where it passes the encrypted token back to the page. This makes for a nicer programming model.

The tag could look like this:

<lp:CardSpaceSelector runat="server" ID="_selector" AutoPostback="true" 
IssuerType="SelfIssued" OnTokenSubmitted="_selector_TokenSubmitted"> <lp:ClaimType Name="Email" /> <lp:ClaimType Name="Surname" /> <lp:ClaimType Name="PPID" /> <lp:ClaimType Type="Custom" CustomName="http://foo" IsOptional="true" /> </lp:CardSpaceSelector>

And the corresponding code:

protected void _selector_TokenSubmitted(object sender, TokenSubmittedEventArgs e)
        // parse and decrypt the token
        Token token = new Token(e.Token);
    catch (Exception ex)

Have fun! (48.28 KB)


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s