# Sandbox.UI.Panel.GetAttribute

```csharp
string GetAttribute(string k, string defaultIfNotFound = null)
```

Gets an attribute value by name, or `defaultIfNotFound` if it was never set.

### Parameters

- `k` (`string`)
- `defaultIfNotFound` (`string`), default `null`

### Returns

`string`

Declared in [Sandbox.UI.Panel](/api/Sandbox.UI.Panel).
Assembly: `Sandbox.Engine`.
