IAttachmentExtensionsGetPath Method |
Note: This API is now obsolete.
Returns relative path for the attachment.
Namespace: Kentico.Content.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax [ObsoleteAttribute("Use IPageAttachmentUrlRetriever instead to retrieve page attachment relative path. To get an instance of the interface's implementation, use dependency injection.")]
public static string GetPath(
this IAttachment attachment,
string variant = ""
)
Parameters
- attachment
- Type: CMS.DocumentEngineIAttachment
The attachment. - variant (Optional)
- Type: SystemString
Identifier of the attachment variant.
Return Value
Type:
StringUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAttachment. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also