Table of Contents

Method EnsureUrlStartsWith

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

EnsureUrlStartsWith(string)

Ensures that the current URL starts with the specified prefix.

public virtual bool EnsureUrlStartsWith(string url)

Parameters

url string

The URL prefix to ensure. Cannot be null or empty.

Returns

bool

Remarks

If the current URL is null, empty, or does not start with the specified prefix, it is set to the provided url. The method does nothing if the object is in a disposing or disposed state.