> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idataobject.md).

# IDataObject

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Provides a format-independent mechanism for transferring data.

{% tabs %}
{% tab title="C#" %}

```csharp
public interface IDataObject
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Interface IDataObject
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u) GetData(format, autoConvert)

Retrieves the data associated with the specified data format, using autoConvert to determine whether to convert the data to the format.

| Parameter       | Type                                                            | Description |
| --------------- | --------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) |             |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetData(format)

Retrieves the data associated with the specified data format.

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/dotnet/api/system.string) |             |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetData(format)

Retrieves the data associated with the specified class type format.

| Parameter  | Type                                                      | Description |
| ---------- | --------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/dotnet/api/system.type) |             |

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetDataPresent(format, autoConvert)

Determines whether data stored in this instance is associated with the specified format, using autoConvert to determine whether to convert the data to the format.

| Parameter       | Type                                                            | Description |
| --------------- | --------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) |             |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetDataPresent(format)

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/dotnet/api/system.string) |             |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetDataPresent(format)

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.

| Parameter  | Type                                                      | Description |
| ---------- | --------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/dotnet/api/system.type) |             |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetFormats(autoConvert)

Gets a list of all formats that data stored in this instance is associated with or can be converted to, using autoConvert to determine whether to retrieve all formats that the data can be converted to or' only native data formats.

| Parameter       | Type                                                            | Description |
| --------------- | --------------------------------------------------------------- | ----------- |
| **autoConvert** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) |             |

**Returns:** [String\[\]](https://docs.microsoft.com/dotnet/api/system.string).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetFormats()

Gets a list of all formats that data stored in this instance is associated with or can be converted to.

**Returns:** [String\[\]](https://docs.microsoft.com/dotnet/api/system.string).

### ![](/files/hsR4ok3152WyAf8J2C1u) SetData(format, autoConvert, data)

Stores the specified data and its associated format in this instance, using autoConvert to specify whether the data can be converted to another format.

| Parameter       | Type                                                            | Description |
| --------------- | --------------------------------------------------------------- | ----------- |
| **format**      | [String](https://docs.microsoft.com/dotnet/api/system.string)   |             |
| **autoConvert** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) |             |
| **data**        | [Object](https://docs.microsoft.com/dotnet/api/system.object)   |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) SetData(format, data)

Stores the specified data and its associated format in this instance.

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **format** | [String](https://docs.microsoft.com/dotnet/api/system.string) |             |
| **data**   | [Object](https://docs.microsoft.com/dotnet/api/system.object) |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) SetData(format, data)

Stores the specified data and its associated class type in this instance.

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **format** | [Type](https://docs.microsoft.com/dotnet/api/system.type)     |             |
| **data**   | [Object](https://docs.microsoft.com/dotnet/api/system.object) |             |

### ![](/files/hsR4ok3152WyAf8J2C1u) SetData(data)

Stores the specified data in this instance, using the class of the data for the format.

| Parameter | Type                                                          | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| **data**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) |             |

## Implemented By

| Name                                                         | Description                                 |
| ------------------------------------------------------------ | ------------------------------------------- |
| [DataObject](/api/wisej.web/general/wisej.web.dataobject.md) | Implements a basic data transfer mechanism. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idataobject.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
