Class PartialViewSnippet
Defines a partial view snippet with its content.
Namespace: Umbraco.Cms.Core.Snippets
Assembly: Umbraco.Core.dll
Syntax
public class PartialViewSnippet : PartialViewSnippetSlim
Remarks
A partial view snippet is a predefined template that can be used when creating new partial views. This class extends PartialViewSnippetSlim by including the actual content of the snippet.
Constructors
View SourcePartialViewSnippet(string, string, string)
Initializes a new instance of the PartialViewSnippet class.
Declaration
public PartialViewSnippet(string id, string name, string content)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique identifier for the snippet. |
| string | name | The display name of the snippet. |
| string | content | The content (Razor markup) of the snippet. |
Properties
View SourceContent
Gets the content of the snippet.
Declaration
public string Content { get; }
Property Value
| Type | Description |
|---|---|
| string |