AODL.Document.Content.Tables.Cell.GetHtml C# (CSharp) Method

GetHtml() public method

Return the content as Html string
public GetHtml ( ) : string
return string
		public string GetHtml()
		{
			string html			= "<td ";

			if (this.ColumnRepeating != null)
				html			+= "colspan="+this.ColumnRepeating+" ";

			if (((CellStyle)this.Style).CellProperties != null)
				html			+= ((CellStyle)this.Style).CellProperties.GetHtmlStyle();

			string htmlwidth	= this.GetHtmlWidth();
			if (htmlwidth != null)
				if (html.IndexOf("style=") == -1)
				html		+= "style=\""+htmlwidth+"\"";
			else
				html		= html.Substring(0, html.Length-1)+htmlwidth+"\"";

			html				+= ">\n";

			foreach(IContent content in this.Content)
				if (content is IHtml)
				html		+= ((IHtml)content).GetHtml();

			if (this.Content != null)
				if (this.Content.Count == 0)
				html		+= "&nbsp;";

			html				+= "\n</td>\n";

			return html;
		}