void ImageBtnDelete_Click(object sender, ImageClickEventArgs e) { if (!string.IsNullOrEmpty(FileUrl) && !string.IsNullOrEmpty(ContainerName)) { //Trim Url down to filename int lastSlash = FileUrl.LastIndexOf("/") + 1; string fileName = FileUrl.Substring(lastSlash); //Delete file from container here Factory factory = new Factory(Options.Username, Options.ApiKey); factory.DeleteItemFromContainer(ContainerName, fileName); //TODO Need to trigger Save() for datatype to remove saved data from property //NOTE Maybe set the ID from datatype to this control, load Content object and set property-alias-value to string.empty. But where does the alias come from? if(Data != null) { //Clear the current datatypes property Property property = new Property(Data.PropertyId) {Value = string.Empty}; //Clear file from controls properties FileUrl = string.Empty; FileUrlField.Text = string.Empty; } } }