Page.ViewStateUserKey Property
.NET Framework 3.0
Assigns an identifier to an individual user in the view-state variable associated with the current page.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
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.
Note: |
|---|
|
You must set this property during the Page_Init phase of page processing. Setting this property during the Page_Load phase throws an exception. |
Community Additions
ADD
Show:
Note: