BuildUnorderedList() public method

Builds an unordered ul list from supplied ICollection. <ul> <li>0</li> ... <li>object</li> </ul>
Calling BuildUnorderedList( ICollection ) results in: <ul> <li>0</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>object</li> </ul>

Items in elements are converted to string through Object.ToString.

public BuildUnorderedList ( ICollection elements ) : String
elements ICollection Collection with items to use for the list generation.
return String
Example #1
0
		public void BuildUnorderedList2()
		{
			String[] args = new String[] { "arg1" };
			HtmlHelper helper = new HtmlHelper();
			Assert.AreEqual( "<ul class=\"style1\">" + Environment.NewLine + "<li class=\"style2\">arg1</li>" + Environment.NewLine + "</ul>" + Environment.NewLine, 
				helper.BuildUnorderedList(args, "style1", "style2") );
		}
Example #2
0
		public void BuildUnorderedList1()
		{
			String[] args = new String[] { "arg1", "arg2" };
			HtmlHelper helper = new HtmlHelper();
			Assert.AreEqual( "<ul>" + Environment.NewLine + "<li>arg1</li>" + Environment.NewLine + "<li>arg2</li>" + Environment.NewLine + "</ul>" + Environment.NewLine, 
				helper.BuildUnorderedList(args) );
		}