## Url class

Provides an object representation of a universal identifier (URL).

```csharp
public class Url : DOMObject
```

## Constructors

| Name | Description |
| --- | --- |
| [Url](url/#constructor)(*string*) | Initializes a new instance of the `Url` with the specified URL. |
| [Url](url/#constructor_1)(*string, string*) | Initializes a new instance of the `Url` with the specified URL and base URL. |

## Properties

| Name | Description |
| --- | --- |
| [Hash](../../aspose.html/url/hash/) { get; set; } | Gets or sets a string representation for the specified URL hash segment. |
| [Host](../../aspose.html/url/host/) { get; set; } | Gets or sets a string representation for the specified URL host. |
| [Hostname](../../aspose.html/url/hostname/) { get; set; } | Gets or sets a string representation for the specified URL hostname. |
| [Href](../../aspose.html/url/href/) { get; set; } | Gets or sets a serialized representation for the specified URL instance. |
| [Origin](../../aspose.html/url/origin/) { get; } | Gets a string representation for the specified URL origin. |
| [Password](../../aspose.html/url/password/) { get; set; } | Gets or sets a string representation for the specified URL password. |
| [Pathname](../../aspose.html/url/pathname/) { get; set; } | Gets or sets a string representation for the specified URL path. |
| [Port](../../aspose.html/url/port/) { get; set; } | Gets or sets a string representation for the specified URL port. |
| [Protocol](../../aspose.html/url/protocol/) { get; set; } | Gets or sets a string representation for the specified URL schema. |
| [Search](../../aspose.html/url/search/) { get; set; } | Gets or sets a string representation for the specified URL search segment. |
| [SearchParams](../../aspose.html/url/searchparams/) { get; } | Gets an associated [`IUrlSearchParams`](../iurlsearchparams/) object. |
| [Username](../../aspose.html/url/username/) { get; set; } | Gets or sets a string representation for the specified URL username. |

## Methods

| Name | Description |
| --- | --- |
| override [Equals](../../aspose.html/url/equals/)(*object*) | Determines whether the specified Object, is equal to this instance. |
| override [GetHashCode](../../aspose.html/url/gethashcode/)() | Returns a hash code for this instance. |
| virtual [GetPlatformType](../../aspose.html.dom/domobject/getplatformtype/)() | This method is used to retrieve the ECMAScript object Type. |
| [ToJson](../../aspose.html/url/tojson/)() | Returns a String that represents this instance. |
| override [ToString](../../aspose.html/url/tostring/)() | Returns a String that represents this instance. |

### See Also

* class [DOMObject](../../aspose.html.dom/domobject/)
* namespace [Aspose.Html](../../aspose.html/)
* assembly [Aspose.HTML](../../)
