473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Bulleted List

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

Mar 30 '07 #1
1 1709
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" <md*****@gmail.comwrote in message
news:11*********************@y80g2000hsf.googlegro 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

Mar 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Stoic | last post by:
I have a bulleted list and want to increase the spacing between the list items but not the line spacing overall. Is there a way to do this? I'd hate to put a <br /> in the <li>'s. Thanks.
1
by: Dan V. | last post by:
Why when I add a bulleted list to a page does it mess up the Navigation list on the left? These are the two pages: (one has a bulleted list the other does not and works fine) ...
2
by: Woody Splawn | last post by:
What is the tool I use to do bullets? That is, I have an ASPx web page and I would like to create have it show three Hyperlinks as follows: Georgia Texas Arizona But I would like each to...
0
by: sawah | last post by:
how do i create a bulleted list in a scroll bar to become part of powerpoint presentation? it opens up a window in VB6 and gives me Private Sub ScrollBar1_Change() End Sub i have 12...
2
ak1dnar
by: ak1dnar | last post by:
CREATE TABLE `products` ( `p_id` int(11) NOT NULL, `p_name` varchar(15) default NULL, `p_features` varchar(100) default NULL ) from this table I am going to fetch the records and display...
1
by: nina297 | last post by:
My bulleted list is grabbing the correct text and value. I'm doing a response.redirect to Bookcategories.aspx but want to use the deafultvaluefield on the other page called classificationid, to...
2
ak1dnar
by: ak1dnar | last post by:
Hi, I have build up a client registration application with HTML/JSP/JS. the form consist with two fields Name,Email. Before insert these values to MySQL table i have done a validation...
0
by: Linda Jimerson | last post by:
Hello - I created a simple Bulleted Rollover List from a Listamatic resource. When I contain this list (in a DIV with a width), IE 6.0 goes crazy (makes a mess). All other browsers act...
10
by: maya | last post by:
hi, I'm having a problem w/bulleted lists.. as you know FF and IE do diff margins/spacing for these, so have to do stuff like /* IE: */ * html ul.headlines {margin-left:20px; margin-top:0px;...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.