# SetContentAsync Method

## Overloads

| [SetContentAsync(String, Boolean)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm#Qlik_Engine_IVariable_SetContentAsync_System_String_System_Boolean_) |  | Sets a value to a variable. |
| --- | --- | --- |
| [SetContentAsync(AsyncHandle, String, Boolean)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm#Qlik_Engine_IVariable_SetContentAsync_Qlik_Engine_AsyncHandle_System_String_System_Boolean_) |  | Sets a value to a variable. |
| [SetContentAsync<T>(AsyncHandle, Func<Response, T>, String, Boolean)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm#Qlik_Engine_IVariable_SetContentAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_System_Boolean_) |  | Sets a value to a variable. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm)

## SetContentAsync(String, Boolean)

Sets a value to a variable.

### Declaration

```

          [Obsolete("Use _GenericVariable::SetProperties_ method instead")]
Task<bool> SetContentAsync([QixName("qContent")] string content, [QixName("qUpdateMRU")] bool updateMRU)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | content | Value of the variable. |
| System.Boolean | updateMRU | If set to true, the value is added to the Most Recently Used (MRU) list. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Remarks

The operation is successful if qReturn is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm)

## SetContentAsync(AsyncHandle, String, Boolean)

Sets a value to a variable.

### Declaration

```

          [Obsolete("Use _GenericVariable::SetProperties_ method instead")]
Task<bool> SetContentAsync(AsyncHandle asyncHandle, [QixName("qContent")] string content, [QixName("qUpdateMRU")] bool updateMRU)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | content | Value of the variable. |
| System.Boolean | updateMRU | If set to true, the value is added to the Most Recently Used (MRU) list. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Remarks

The operation is successful if qReturn is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IVariable.SetContentAsync.htm)

## SetContentAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;, String, Boolean)

Sets a value to a variable.

### Declaration

```
[Obsolete("Use _GenericVariable::SetProperties_ method instead")]
Task<T> SetContentAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qContent")] string content, [QixName("qUpdateMRU")] bool updateMRU)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | content | Value of the variable. |
| System.Boolean | updateMRU | If set to true, the value is added to the Most Recently Used (MRU) list. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### Remarks

The operation is successful if qReturn is set to true.