# DataSourceManager.ConnectionStringChanged Event

> Is fired when the contents of the ConnectionString property change.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataSources > DataSourceManager.ConnectionStringChanged Event
- **323 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/connectionstringchanged-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/connectionstringchanged-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/connectionstringchanged-event/llms-full.txt

---

### Description

Is fired when the contents of the [ConnectionString](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/connectionstring-property/llms-full.txt) property change.

### Syntax

```csharp
public event EventHandler ConnectionStringChanged;
```

```vbnet
Public Event ConnectionStringChanged As EventHandler
```

### Examples

The following example records useful context when connection string changed occurs.

```csharp
dataSourceManager.ConnectionStringChanged += (sender, e) =>
{
    Console.WriteLine($"Connection String Changed at {DateTime.Now:u}");
};
```

```vbnet
AddHandler dataSourceManager.ConnectionStringChanged,
    Sub(sender, e)
        Console.WriteLine($"Connection String Changed at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [DataSourceManager.ConnectionString Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/connectionstring-property/llms-full.txt)
- **Next:** [DataSourceManager Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/constructor/llms-full.txt)
