## MhtmlRenderingOptions.ExcludeAttachment method

Excludes a specific attachment from rendering by its URL. Only used when [`RenderAllAttachments`](../renderallattachments/) is true.

```csharp
public void ExcludeAttachment(string attachmentUrl)
```

| Parameter | Type | Description |
| --- | --- | --- |
| attachmentUrl | String | The URL of the attachment to exclude. |

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentNullException | Thrown when *attachmentUrl* is null. |
| ArgumentException | Thrown when *attachmentUrl* is empty. |

### See Also

* class [MhtmlRenderingOptions](../)
* namespace [Aspose.Html.Rendering](../../../aspose.html.rendering/)
* assembly [Aspose.HTML](../../../)
