---
id: "M:cAlgo.API.WebView.NavigateToStringAsync(System.String)"
kind: "method"
type: "T:cAlgo.API.WebView"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/WebView/NavigateToStringAsync/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# WebView.NavigateToStringAsync

Member of [WebView](https://help.ctrader.com/ctrader-algo/references/Controls/WebView/index.md).

## NavigateToStringAsync(string html)

Initiates a navigation asynchronously to html content as source HTML of a new document.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public void NavigateToStringAsync(string html)
```

Python:

```python
webView.NavigateToStringAsync(html: str) -> None
```

### Parameters

- `html` (`string`, Python `str`): HTML content

### Examples

C#:

```csharp
var webView = new WebView { Width = 300, Height = 120 };
webView.NavigateToStringAsync("<html><body><h3>" + SymbolName + " bid: " + Symbol.Bid + "</h3></body></html>");
Chart.AddControl(webView);
```

Python:

```python
webView = WebView()
webView.Width = 300
webView.Height = 120
webView.NavigateToStringAsync(f"<html><body><h3>{api.SymbolName} bid: {api.Symbol.Bid}</h3></body></html>")
api.Chart.AddControl(webView)
```

