New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Extension methods for TextWriter.

Definition

Namespace:Kendo.Mvc.Extensions

Assembly:Kendo.Mvc.dll

Syntax:

C#
public static class TextWriterExtensions

Inheritance: objectTextWriterExtensions

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Methods

Writes content to the TextWriter using the specified action, with optional HTML encoding.

C#
public static void WriteContent<T>(this TextWriter writer, Func<T, object> action, HtmlEncoder htmlEncoder, T dataItem = null, bool htmlEncode = false) where T : class
Parameters:writerTextWriter

The text writer.

actionFunc<T, object>

The action to generate content.

htmlEncoderHtmlEncoder

The HTML encoder.

dataItemT

The data item to pass to the action.

htmlEncodebool

Whether to HTML encode the output.