Method EnsureUrlStartsWith
EnsureUrlStartsWith(string)
Ensures that the current URL starts with the specified prefix.
public virtual bool EnsureUrlStartsWith(string url)
Parameters
urlstringThe URL prefix to ensure. Cannot be null or empty.
Returns
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.