Assembly: System.Web (in system.web.dll)
/** @property */ public String get_ViewStateUserKey () /** @property */ public void set_ViewStateUserKey (String value)
public function get ViewStateUserKey () : String public function set ViewStateUserKey (value : String)
Property ValueThe identifier for the individual user.
The ViewStateUserKey property was accessed too late during page processing.
Setting the ViewStateUserKey property can help you prevent attacks on your application from malicious users. It does this by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. You can set this property to any string value, such as the user's session ID or the user's authenticated name.
You must set this property during the Page_Init phase of page processing. Setting this property during the Page_Load phase throws an exception.