static IHtmlControl GetRedoAvatarPanel(LightObject user) { return(new HPanel( new HFileUploader("/avatarupload", "Выбрать аватар", user.Id), Decor.Button("Удалить аватар").MarginTop(5).Event("avatar_delete", "", delegate { File.Delete(UrlHlp.ImagePath(Path.Combine("users", user.Id.ToString(), "avatar.png"))); } ) ).MarginTop(5)); }