Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net repeaters. To use or not to use

We are currently using a repeater to display input fields, drop downs, check boxes, and calendar items on each row. The desired functionality is to allow the user to add up to 10(this could potentially change by web config) items (each row).

Is it appropriate to list these out in a repeater or am I going about this the wrong way? What should I be using? Is there something lighter?

like image 670
Boone Avatar asked Dec 14 '22 02:12

Boone


2 Answers

asp.net repeaters. To use or not to use

USE!

A repeater is crazy lightweight and perfect for this. Use it all over the place!

Slightly more in-depth answer:

If you are having some performance problems that are causing you to rethink your code, start by profiling. It will shed light on where the real problems are right away, and I guarantee they won't be from using a repeater. The amount of time your application spends in repeater code is almost certainly not even worth measuring.

If you're not having performance problems, why are you asking? :) Go build something or have a coffee and leave well enough alone. Don't optimize until it's clear you need optimization.

like image 121
Rex M Avatar answered Dec 27 '22 10:12

Rex M


Repeater is about as light weight as it gets. If you have a sound code base that supports iteratively showing fields with a Repeater, then that's basically as good as it gets.

like image 35
M. Ryan Avatar answered Dec 27 '22 10:12

M. Ryan