private void SetFileInfo(ContentPage cp)
{
string sFieldValue = cp.Thumbnail;
if (String.IsNullOrEmpty(sFieldValue)) {
// if page itself has no image, see if the image had been specified directly
sFieldValue = this.ImageUrl;
}
if (String.IsNullOrEmpty(sFieldValue)) {
this.Visible = false;
}
if (!String.IsNullOrEmpty(sFieldValue) && !sFieldValue.StartsWith("/")) {
sFieldValue = cp.TemplateFolderPath + sFieldValue;
}
if (PerformURLResize && !String.IsNullOrEmpty(sFieldValue)) {
sFieldValue = String.Format("/carrotwarethumb.axd?scale={0}&thumb={1}&square={2}", ScaleImage, HttpUtility.UrlEncode(sFieldValue), ThumbSize);
}
this.ImageUrl = sFieldValue;
}