|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I create an Unordered List (UL) with ASP.NET?I want to add a bulleted list to my document in ASP.NET. I know the HTML
code, and I have used the HtmlGenericControl, but is there an ASP.NET object that can generate UL and LI tags from a set of ListItem objects, or maybe some other collection? Thanks. Hi Nathan,
You can use the ASP.NET Repeater control for this purpose. you can use the following code snippet for creating an unordered list using the Repeater control: <ul> <asp:Repeater ID="rpt1" Runat="server"> <ItemTemplate> <li> <%# DataBinder.Eval(Container.DataItem, "Item") %> </li> </ItemTemplate> </asp:Repeater> </ul> You can bind the Repeater to any Datasource or Collection Object such as a dataset or a datatable or an arraylistas per your need. HTH Mona[Grapecity] Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:%231wGpDWZFHA.4008@tk2msftngp13.phx.gbl... >I want to add a bulleted list to my document in ASP.NET. I know the HTML > code, and I have used the HtmlGenericControl, but is there an ASP.NET object > that can generate UL and LI tags from a set of ListItem objects, or maybe > some other collection? Thanks. > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > >
Error: Cannot use a leading .. to exit above the top directory.
DROPDOWNLIST SELECTEDINDEXCHANGED order of usercontrols processed by events of page HTMLInputFile Control for Multiple Files Submit form ASP.NET Server Controls not displayed in IE How to diisable textbox in datagrid Infragistics Web Control Report & Sub Report About CheckBoxList Control ... |
|||||||||||||||||||||||