ObjectStateFormatter::Deserialize Method (String^)

 

Deserializes an object state graph from its serialized base64-encoded string form.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public:
Object^ Deserialize(
	String^ inputString
)

Parameters

inputString
Type: System::String^

A string that the ObjectStateFormatter deserializes into an initialized object.

Return Value

Type: System::Object^

An object that represents a deserialized object state graph.

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.

System_CAPS_security 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: