0

I have am using JQuery Mobile in asp.net web form and on button click I want to load the list. In code behind I am getting the list is this way

List<Reportee> associates = new List<Reportee>();
associates = DALLayer.GetReporteeForEmployee(EmployeeId);

Here, associate is a class which has two property [reporteeName and reporteeId].

How can I show all the reportee Name in the list?

Chris
  • 2,293
  • 11
  • 48
  • 86

1 Answers1

0

print a <ul> tag

for each associate:

  • print <li>
  • print the text you want
  • print </li>

when foreach ends print </ul>

I have no idea why you asked...

What does it have to do with jquery mobile? O, I know! Instead of <ul> print <ul data-role="listview">

naugtur
  • 16,827
  • 5
  • 70
  • 113
  • I have done the same in the aspx page but it is expecting to load the list on the page load, I want the same at the button click event which means I have to inititate the list creation after button click, how can I do so ? – Chris May 06 '11 at 14:49
  • That's done with AJAX. If you don't want to make it another page or dialog, then you have to write some javascript on your own. Loading a list via AJAX with help of jQuery is an old subject, you'll find it everywhere – naugtur May 06 '11 at 20:57
  • Like this for example: http://stackoverflow.com/questions/4136092/re-populate-drop-down-list-options-how-to-clear-options-list-and-then-re-populat – naugtur May 07 '11 at 09:32