Solved

bulleted list help

Posted on 2006-11-17
2
340 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-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

752 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