Try our conversational search powered by Generative AI!

Class UrlRewriteEventArgs

Common event arguments for Url rewriting, both with and without context

Inheritance
System.Object
System.EventArgs
UrlRewriteEventArgs
Inherited Members
System.EventArgs.Empty
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class UrlRewriteEventArgs : EventArgs

Constructors

UrlRewriteEventArgs()

Initializes a new instance of the UrlRewriteEventArgs class.

Declaration
public UrlRewriteEventArgs()

UrlRewriteEventArgs(UrlBuilder)

Initializes a new instance of the UrlRewriteEventArgs class.

Declaration
public UrlRewriteEventArgs(UrlBuilder url)
Parameters
Type Name Description
UrlBuilder url

The URL.

UrlRewriteEventArgs(UrlBuilder, UrlRewriteEventArgs.Context)

Initializes a new instance of the UrlRewriteEventArgs class.

Declaration
public UrlRewriteEventArgs(UrlBuilder url, UrlRewriteEventArgs.Context context)
Parameters
Type Name Description
UrlBuilder url

The URL.

UrlRewriteEventArgs.Context context

The context.

UrlRewriteEventArgs(UrlBuilder, UrlRewriteEventArgs.Context, Encoding)

Initializes a new instance of the UrlRewriteEventArgs class.

Declaration
public UrlRewriteEventArgs(UrlBuilder url, UrlRewriteEventArgs.Context context, Encoding encoding)
Parameters
Type Name Description
UrlBuilder url

The URL.

UrlRewriteEventArgs.Context context

The context.

System.Text.Encoding encoding

The encoding.

Properties

Cancel

Gets or sets a value indicating whether further processing should be cancelled.

Declaration
public bool Cancel { get; set; }
Property Value
Type Description
System.Boolean

true if cancel; otherwise, false.

Encoding

Gets or sets the encoding to use when escaping the URL

Declaration
public Encoding Encoding { get; set; }
Property Value
Type Description
System.Text.Encoding

The encoding.

ForceRewriteHtml

Get or Set a value indicating whether rewrite url should be continue regardless of cancel action.

Declaration
public bool ForceRewriteHtml { get; set; }
Property Value
Type Description
System.Boolean

Internal

Gets or sets an optional internal representation of the URL, or other information in the context of the specific event.

Declaration
public object Internal { get; set; }
Property Value
Type Description
System.Object

The internal.

IsMappableUrl

Gets or sets a value indicating whether this Url represents a url served by this site or another site in the same enterprise setup.

Declaration
[Obsolete("This method only supports classic/mapped url's which are no longer used since 8.0 - use PermanentLinkUtility.GetGuid(url) to get the unique ID from an URL")]
public bool IsMappableUrl { get; set; }
Property Value
Type Description
System.Boolean

true if the url is served by this site (or another enterprise site); otherwise, false.

IsModified

Gets or sets a value indicating whether this instance is modified.

Declaration
public bool IsModified { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is modified; otherwise, false.

OnlyRebaseUrl

Gets or sets a value indicating whether the only operation on the URL will be rebasing.

Declaration
public bool OnlyRebaseUrl { get; set; }
Property Value
Type Description
System.Boolean

true if URL should be rebased; otherwise, false.

Remarks

This information is needed for relative URLs that reference "static" information that is not moved as a result of of Friendly URL handling. Typically ASP.NET autogenerated links for themes etc.

Url

Gets or sets the URL to rewrite

Declaration
public UrlBuilder Url { get; set; }
Property Value
Type Description
UrlBuilder

The URL.

UrlContext

Gets or sets the URL context for rebasing operations.

Declaration
public UrlRewriteEventArgs.Context UrlContext { get; set; }
Property Value
Type Description
UrlRewriteEventArgs.Context

The URL context.

Extension Methods