Share via


TagBuilder.ToString Method (TagRenderMode)

Returns a string that represents the current object by using the specified tag-render mode.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Function ToString ( _
    renderMode As TagRenderMode _
) As String
public string ToString(
    TagRenderMode renderMode
)
public:
String^ ToString(
    TagRenderMode renderMode
)

Parameters

Return Value

Type: System.String
A string that represents the current object.

Remarks

Use this method to render the HTML tag. Using the renderMode parameter, you can render a start tag, an end tag, or a self-closing tag.

See Also

Reference

TagBuilder Class

ToString Overload

System.Web.Mvc Namespace