Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <div class="col-lg-4 col-md-4 hidden-sm hidden-xs">
  2. <asp:Label ID="TopDonator1" runat="server" Text="Bob" Visible="true" CssClass="TopDonators"></asp:Label>
  3. <asp:Label ID="Donation1" runat="server" Text="$250" Visible="true" CssClass="TopDonations"></asp:Label>
  4. </div>
  5. <div class="col-lg-4 col-md-4 hidden-sm hidden-xs">
  6. <asp:Label ID="TopDonator2" runat="server" Text="Terry" Visible="true" CssClass="TopDonators"></asp:Label>
  7. <asp:Label ID="Donation2" runat="server" Text="$650" Visible="true" CssClass="TopDonations"></asp:Label>
  8. </div>
  9. <div class="col-lg-4 col-md-4 hidden-sm hidden-xs">
  10. <asp:Label ID="TopDonator3" runat="server" Text="Jim" Visible="true" CssClass="TopDonators"></asp:Label>
  11. <asp:Label ID="Donation3" runat="server" Text="$2000" Visible="true" CssClass="TopDonations"></asp:Label>
  12. </div>
  13.  
  14. int currentRow = 1;
  15. foreach (DataRow row in topDonors.Rows)
  16. {
  17. if (currentRow > 3)
  18. return;
  19. else
  20. {
  21. //Code to display name and donation amount goes here
  22. currentRow++;
  23. }
  24. }
  25.  
  26. int currentRow = 1;
  27. foreach (DataRow row in topDonors.Rows)
  28. {
  29. if (currentRow > 3)
  30. return;
  31. else
  32. {
  33. TopDonator + currentRow = row["DonorName"].ToString();
  34. Donation + currentRow = row["Donation"].ToString();
  35. currentRow++;
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement