Bulleted List

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
 
D

David Wier

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top