Bulleted List

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a DataSet with 3 columns:

Id, Name, Number

I want to display a list (maybe a bulleted list?) which display a list
item where each one is an anchor.

The text of each anchor is created as follows:

Name (Number)

The url to which the user is sent when clicking a link is:

MyPage.Aspx?SectionId=Id

I have the following:

If Not Page.IsPostBack Then
bl.DataSource = MyDataSet
bl.DataBind()
End If

My problem is how to create each item as an anchor with the text and
address as I described.

Thanks,

Miguel
 
You can use a DataList, using an ItemTemplate, forming the link exactly the
way you want
Something like:
<ItemTemplate>
<A HREF='MyPage.Aspx?SectionId=<%# Container.DataItem("id") %>'><%#
Container.DataItem("Name") %></a>
</ItemTemplate>
 
Back
Top