Solved

bulleted list help

Posted on 2006-11-17
2
338 Views
Last Modified: 2012-06-21
I have a bulleted list control on my page and have successfully binded data to the list:

if (!Page.IsPostBack)
{

BulletedList1.DataSource = EmploymentOpportunityDAO.GetList();
BulletedList1.DataValueField = "ID";
BulletedList1.DataTextField = "title";
BulletedList1.DataBind();
}

What I'd like to do is set the DataTextField to a link and pass the DataValueField in a QueryString to my details page, EmploymentDetails.aspx, so I can display all the data.

I'm trying to do something like the following:
"<li><a href='EmploymentDetails.aspx?id=" + emp.ID + "'>" + emp.title.ToUpper() + "</a></li>"

I just don't know how to do this with a bulleted list control?


Also how can I convert the DataTextField to uppercase?  I was trying to use ToUpper(), but I'm not coding it correctly.

Thanks for any help.
0
Comment
Question by:-Dman100-
2 Comments
 
LVL 13

Accepted Solution

by:
jeebukarthikeyan earned 500 total points
ID: 17970763
Hi ,
      <asp:bulletedlist id="BulletedList1" runat="server"
        displaymode="HyperLink"
        datasourceid="Datasetdatasource1"
        datatextfield="Name"                          //give the text here
        datavaluefield="Url" />                       //give the url here

b u d d h a
0
 

Author Comment

by:-Dman100-
ID: 17971214
Thanks budda,

How do I set the datavaluefield as a querystring?

I'm trying:

DataValueField="employmentdetails.aspx?id= + employment_opportunity_id"

that doesn't work.  What is the correct syntax?

Thanks for your help.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question