string GetNodeImageToolTip (bool expand, string txt)
{
if (expand) {
string expandImageToolTip = ExpandImageToolTip;
if (!String.IsNullOrEmpty (expandImageToolTip))
return String.Format (expandImageToolTip, HttpUtility.HtmlAttributeEncode (txt));
else if (txt != null)
return "Expand " + HttpUtility.HtmlAttributeEncode (txt);
else
return "Expand {0}";
} else {
string collapseImageToolTip = CollapseImageToolTip;
if (!String.IsNullOrEmpty (collapseImageToolTip))
return String.Format (collapseImageToolTip, HttpUtility.HtmlAttributeEncode (txt));
else if (txt != null)
return "Collapse " + HttpUtility.HtmlAttributeEncode (txt);
else
return "Collapse {0}";
}
}