Scenario: You need to display a list of products from a database, and you want full control over the HTML markup for each product item. Which ADO.NET control would you choose, and why?

  • DataList
  • GridView
  • ListBox
  • Repeater
The Repeater control in ADO.NET would be the optimal choice for this scenario. It offers the highest level of flexibility in defining the HTML markup for each item in the list. Unlike other controls like DataList or GridView, the Repeater control does not impose any predefined structure on the output, allowing you to have full control over the generated HTML. This makes it ideal for scenarios where custom HTML markup is required, such as displaying products with specific styling or layout requirements.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *