Controller::Content Method

 

Creates a content result object.

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

NameDescription
System_CAPS_protmethodContent(String^)

Creates a content result object by using a string.

System_CAPS_protmethodContent(String^, String^)

Creates a content result object by using a string and the content type.

System_CAPS_protmethodContent(String^, String^, Encoding^)

Creates a content result object by using a string, the content type, and content encoding.

Return to top

Controller::Content Method (String^)

Creates a content result object by using a string.

public protected:
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 ASP.NET MVC framework when the object is executed.

Return to top

Controller::Content Method (String^, String^)

Creates a content result object by using a string and the content type.

public protected:
ContentResult^ Content(
	String^ content,
	String^ contentType
)

Parameters

content
Type: System::String^

The content to write to the response.

contentType
Type: System::String^

The content type (MIME type).

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 ASP.NET MVC framework when the object is executed.

Return to top

Controller::Content Method (String^, String^, Encoding^)

Creates a content result object by using a string, the content type, and content encoding.

public protected:
virtual ContentResult^ Content(
	String^ content,
	String^ contentType,
	Encoding^ contentEncoding
)

Parameters

content
Type: System::String^

The content to write to the response.

contentType
Type: System::String^

The content type (MIME type).

contentEncoding
Type: System.Text::Encoding^

The content encoding.

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 ASP.NET MVC framework when the object is executed.

Return to top
Show: