MSDN Library

Controller::Content Method (String)

Creates a content result using a string.

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

protected public:
ContentResult^ Content(
	String^ content
)

Parameters

content
Type: System::String
The content to write to the response.

Return Value

Type: System.Web.Mvc::ContentResult
The content result instance.

The result object that is prepared by this method is written to the response by the MVC framework when the object is executed.

The example in this section shows how to use markup and code to display "Use <b> for bold text" in the browser when the Test Content link is clicked.

The following example shows markup that invokes the TestContent method.

No code example is currently available or this language may not be supported.

The following example shows the TestContent method.

No code example is currently available or this language may not be supported.

Community Additions

Show:
© 2016 Microsoft