System.Web.UI.WebControls.TreeView.GetNodeImageToolTip C# (CSharp) Method

GetNodeImageToolTip() private method

private GetNodeImageToolTip ( bool expand, string txt ) : string
expand bool
txt string
return string
		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}";
			}
		}