2
Answers

C# code for Tabular list

Abhijit P

Abhijit P

15y
4.2k
1

I need to convert a list into tabular format. I tried using normal HTML code but didnt work. I need 2 cols. in the table. This is a aspx.cs file.
Please help me with this as i am a newbie.
The list code is given below:
 
 private void AddCategoryToMenu(string title)
 {
  HtmlAnchor a = new HtmlAnchor();
  a.InnerHtml = Server.HtmlEncode(" " + title) + "<BR>";
  a.HRef = "#" + Utils.RemoveIllegalCharacters(title);
  a.Attributes.Add("rel", "directory");
  HtmlGenericControl li = new HtmlGenericControl("img align=middle src=images/icons/" + title );
  li.Controls.Add(a);
  ulMenu.Controls.Add(li);
 }
Answers (2)