Repeater control

Results 1 to 2 of 2

Thread: Repeater control

  1. #1
    Join Date
    Dec 1969

    Default Repeater control

    I&#039;m an ASP/VB guy from way back, new to .NET. When using the repeater control, it loops through all the records. In ASP, I&#039;d do this:<BR><BR>do until rs.eof<BR> &#039;do stuff<BR> if rs.fields("condition") = "Health" then<BR> &#039;do certain stuff here<BR> end if<BR>rs.movenext<BR>loop<BR><BR>How do I check for a condition using the repeater control, and then show certain values, make a different display, based on where I am in the loop? (i.e. when condition = "health)? I&#039;m sure this is an easy answer, I&#039;m just new to this game. I really appreciate it.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Repeater control

    Well, first off, from the example that you gave, I&#039;d suggest checking the critera in the database instead. It doesn&#039;t look like you&#039;re doing anything that needs to make it to the level of code, and the performance gains could be huge. <BR><BR>If you *do* need to handle it in code, look at the DataView class, which allows you to pass selection critera.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts