Asp.Net components and Internet solutions
Quality Data

The CardSpace Button Control for Asp.Net

The CardSpace Button Control derives from the CardSpace Control but is rendered as an HTML button with an image and a caption such as "Sign in with your Information Card". Like its base, the CardSpace Button Control adds all the page elements needed to activate your user's Information Card Selector (Windows CardSpace) and request Identity Claims. Just drop it onto your web page, pick the image to display and specify which claims you wish to receive. The CardSpace Button Control inserts the required <Object> tag, hidden fields and JavaScript required to make it all work. 



The CardSpace Button Control

 

Design-time properties

Properties are available for just about everything you will need in requesting Identity Claims. Most of the properties are inherited from the CardSpace Control but the CardSpace Button Control adds a few more that give you control over its appearance.



CardSpace Button Properties


Events

Just like the CardSpace Control, the CardSpace Button raises the following events which you can use to programmatically handle arriving Identity Claims:
  • ClaimsPresented - Provides a claims object
  • ClaimsPresentedError - Provides the claims object plus the exception

 

How the CardSpace Button is used

The CardSpace Button was created for use as a constituent control in the CardSpace Login CardSpace Manage, and CardSpace NewAccount Controls but you can use it in your own applications if you like. 

Since the button is rendered as an input control that contains HTML markup (an embedded table, the image and the prompt text), Asp.Net will display the warning "A potentially dangerous Request.Form value was detected from the client".  This is the default behavior to prevent potential script/sql injection attacks. Assuming you've taken basic defensive measures, you can safely disable this behavior by setting "ValidateRequest = false" in the page declaration (first line in source view) of your web page.



Setting ValidateRequest = "False"



Support

If you need help getting the CardSpace Control to work on your web site, please visit our Support Forum. The complete API for the CardSpace Controls is available here.