Assembly: System.Web (in system.web.dll)
Property ValueA user-specific string stored with the ticket. The default is an empty string ("").
If the FormsAuthenticationTicket is created using a constructor that does not supply a userData parameter, the UserData property returns an empty string (""); otherwise, the version property returns the value supplied to the FormsAuthenticationTicket constructor.
You can use the UserData property to store additional user information with the FormsAuthenticationTicket that is not maintained by the FormsAuthenticationTicket property values.
You should limit the amount of data stored in the UserData property. You must ensure that the size of the UserData property does not result in an invalid cookie or an excessively long URL.
The following code example displays the property values of the FormsAuthenticationTicket for the current logged-on user.
If there is no logged-on user, the Identity property will be a null reference (Nothing in Visual Basic) and you will receive a compiler exception when attempting to cast the Identity property as a FormsIdentity object.