GamerCard Class

Displays an Xbox gamer card.


Namespace:  Microsoft.Web.Helpers
Assembly:  Microsoft.Web.Helpers (in Microsoft.Web.Helpers.dll)

public static class GamerCard

The GamerCard type exposes the following members.

Public methodStatic memberGetHtmlDisplays an Xbox gamer card.

This class represents a helper, which is a component that simplifies Web programming in ASP.NET Web Pages.

When people play Microsoft Xbox games online, each user has a unique ID. Statistics are kept for each player in the form of a gamer card, which shows their reputation, gamer score, and recently played games. If you are an Xbox gamer, you can show your gamer card on pages in your site by using the GamerCard class.


The GamerCard class requires the use of iframe elements, which are XHTML 1.0 compliant but not XHTML 1.1 compliant. HTML5 is backwards compatible and supports iframe elements, it does not yet include the scrolling and frameborder attributes. There is no CSS alternative for attributes that can be used on the page that contains the iframe element. Therefore, the markup that is rendered by the GamerCard object output is not currently fully HTML5 compliant.

The following example shows how to use a GamerCard object.

<!DOCTYPE html> 
    <title>Xbox Gamer Card</title> 
    <h1>Xbox Gamer Card</h1> 
    @GamerCard.GetHtml("major nelson") 

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.