Location

Location class

Location objects provide a representation of the address of the active document of their Document’s browsing context, and allow the current entry of the browsing context’s session history to be changed, by adding or replacing entries in the history object.

public sealed class Location : Url

Properties

Name Description
Hash { get; set; } Gets or sets a string representation for the specified URL hash segment.
Host { get; set; } Gets or sets a string representation for the specified URL host.
Hostname { get; set; } Gets or sets a string representation for the specified URL hostname.
Href { get; set; } Gets or sets a serialized representation for the specified URL instance.
Origin { get; } Gets a string representation for the specified URL origin.
Password { get; set; } Gets or sets a string representation for the specified URL password.
Pathname { get; set; } Gets or sets a string representation for the specified URL path.
Port { get; set; } Gets or sets a string representation for the specified URL port.
Protocol { get; set; } Gets or sets a string representation for the specified URL schema.
Search { get; set; } Gets or sets a string representation for the specified URL search segment.
SearchParams { get; } Gets an associated IUrlSearchParams object.
Username { get; set; } Gets or sets a string representation for the specified URL username.

Methods

Name Description
Assign(string) Navigates to the given page.
override Equals(object) Determines whether the specified Object, is equal to this instance.
override GetHashCode() Returns a hash code for this instance.
virtual GetPlatformType() This method is used to retrieve the ECMAScript object .
Reload() Reloads the current page.
Replace(string) Removes the current page from the session history and navigates to the given page.
ToJson() Returns a String that represents this instance.
override ToString() Returns a String that represents this instance.

See Also