This is more of a design question. I am working on a website and want to create a table for displaying search results. The table will display various items that are for sale. Each row will have basic information about the item (name, various specs, and an image). Each row will be clickable so that the item’s detailed page can be displayed.
I know of a few ways I could do this, but I was wondering if there is a “best practice” to handle this sort of thing.
I have an “item” object that contains all the info I want to display. Is there an easy way to create a graphical object that I populate with info from the result set and then bind these rows to my table?
Sorry if this is too broad, but I am not particularly skilled with HTML yet and want to make sure I learn the proper way to do things like this.
I would look up the Repeater control which lets you bind data to custom HTML in a rather flexible way. There are higher-level controls like the DataGrid which can be very efficient to use in terms of programming time if your problem matches its structure, but in general I prefer the more light-weight approach of the Repeater.