private string ComposePrimaryPhotoUrl(Classes.User user) { Classes.Photo primaryPhoto = null; try { primaryPhoto = user.GetPrimaryPhoto(); } catch (NotFoundException) { } catch (Exception err) { Log(err); } const int photoWidthHeight = 90; bool hasPrimaryPhoto = (primaryPhoto != null && primaryPhoto.Approved); return hasPrimaryPhoto ? ImageHandler.RenderImageTag(primaryPhoto.Id, photoWidthHeight, photoWidthHeight, "photoframe", false, true) : ((user.FacebookID.HasValue) ? ImageHandler.RenderFacebookImageTag(user.FacebookID.Value, ImageHandler.eFacebookImageType.Default, "photoframe") : ImageHandler.RenderImageTag(user.Gender, photoWidthHeight, photoWidthHeight, "photoframe", false, true)); }