Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Bulleted List

Reply
Thread Tools

Bulleted List

 
 
shapper
Guest
Posts: n/a
 
      03-30-2007
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

 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      03-30-2007
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>


--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"shapper" <> wrote in message
news: ups.com...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulleted Paragraph List.....how? toxee HTML 4 04-23-2009 05:27 AM
Creating html from asp bulleted list in listitem wilf ASP .Net 1 09-21-2007 07:05 PM
Bulleted List question nina297 ASP .Net 1 03-22-2007 08:49 PM
A bulleted list in an ASP.NET Texbox Dave Harrington ASP .Net Web Controls 1 04-05-2005 09:48 PM
How do Bulleted list? Woody Splawn ASP .Net 2 05-19-2004 10:23 PM



Advertisments