Documentation > CMS Template API Library > Util > GetExtension(String)

GetExtension

Takes a filename and returns its extension. Wil return empty if no extension is found. Ex: GetExtension("input.aspx") will return "aspx"

public System.String GetExtension(String)


Returns

The extension without the ".", or an empty string.

Parameters

NameDescriptionType
filename File name to extract the extension from. System.String

Connect with Crownpeak