Try our conversational search powered by Generative AI!

Class XhtmlStringExtensions

Contains extension methods related to XhtmlString for System.Web.Mvc.HtmlHelper.

Inheritance
System.Object
XhtmlStringExtensions
Inherited Members
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.Mvc.Html
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class XhtmlStringExtensions

Methods

RenderXhtmlString(HtmlHelper, XhtmlString)

Writes the value of the specified XhtmlString to the view context's output stream.

Declaration
public static void RenderXhtmlString(this HtmlHelper htmlHelper, XhtmlString xhtmlString)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper htmlHelper

The HTML helper instance that this method extends.

XhtmlString xhtmlString

The XHTML string whose value to write.

Remarks

To create the return value the property's permanent links are converted to external format, dynamic content is rendered and personalized content considered.

Exceptions
Type Condition
System.ArgumentNullException

xhtmlString is null.

RenderXhtmlString(HtmlHelper, XhtmlString, VirtualPathArguments)

Writes the value of the specified XhtmlString to the view context's output stream.

Declaration
public static void RenderXhtmlString(this HtmlHelper htmlHelper, XhtmlString xhtmlString, VirtualPathArguments virtualPathArguments)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper htmlHelper

The HTML helper instance that this method extends.

XhtmlString xhtmlString

The XHTML string whose value to write.

VirtualPathArguments virtualPathArguments

Set the ForceAbsolute attribute to true if you want to force to use the absolute url. Set the ForceCanonical attribute to true if you want to force to use the canonical url.

Remarks

To create the return value the property's permanent links are converted to external format, dynamic content is rendered and personalized content considered.

Exceptions
Type Condition
System.ArgumentNullException

xhtmlString is null.

XhtmlString(HtmlHelper, XhtmlString)

Returns the value of the specified XhtmlString as a string.

Declaration
public static MvcHtmlString XhtmlString(this HtmlHelper htmlHelper, XhtmlString xhtmlString)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper htmlHelper

The HTML helper instance that this method extends.

XhtmlString xhtmlString

The XHTML string whose value to write.

Returns
Type Description
System.Web.Mvc.MvcHtmlString

The value of the xhtmlString modified for external use.

Remarks

To create the return value the property's permanent links are converted to external format, dynamic content is rendered and personalized content considered.

Exceptions
Type Condition
System.ArgumentNullException

xhtmlString is null.

XhtmlString(HtmlHelper, XhtmlString, VirtualPathArguments)

Returns the value of the specified XhtmlString as a string.

Declaration
public static MvcHtmlString XhtmlString(this HtmlHelper htmlHelper, XhtmlString xhtmlString, VirtualPathArguments virtualPathArguments)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper htmlHelper

The HTML helper instance that this method extends.

XhtmlString xhtmlString

The XHTML string whose value to write.

VirtualPathArguments virtualPathArguments

Set the ForceAbsolute attribute to true if you want to force the link is absolute. Set the ForceCanonical attribute to true if you want to force the link is canonical.

Returns
Type Description
System.Web.Mvc.MvcHtmlString

The value of the xhtmlString modified for external use.

Remarks

To create the return value the property's permanent links are converted to external format, dynamic content is rendered and personalized content considered.

Exceptions
Type Condition
System.ArgumentNullException

xhtmlString is null.