ObjectStateFormatter::Deserialize Method (String^)
Deserializes an object state graph from its serialized base64-encoded string form.
Assembly: System.Web (in System.Web.dll)
Parameters
- inputString
-
Type:
System::String^
A string that the ObjectStateFormatter deserializes into an initialized object.
| Exception | Condition |
|---|---|
| ArgumentNullException | The specified inputString is null or has a Length of 0. |
| ArgumentException | The serialized data is invalid. |
| HttpException | The machine authentication code (MAC) validation check that is performed when deserializing view state fails. |
Any object state graph that is serialized with the Serialize method can be deserialized with the Deserialize method. The Deserialize(String^) method is used to restore an object state graph stored in base64-encoded string form.
Security Note
|
|---|
Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks. |
The following code example demonstrates how to implement a method that deserializes a base64-encoded string and returns an ICollection collection of property settings. This code example relies on the property settings having been serialized with the ObjectStateFormatter class, as shown in the Serialize(Object^) method.
Available since 2.0
