I am a new ASP.NET developer and now I need to develop a data entry system with 15 fields that allow the admin of the system to enter some data under each one of these 15 properties. From what I learned in ASP.NET tutorial, I think the best control is the ListView control in order to give the admin of the system to enter a new field if he wants in the future. My problem now is the following: How to divide these 15 fields into two columns? Because all what I see about using ListView is putting all of the properties at the first row and the entries will be underneath of them. What I want is to create a list with two columns of properties and two columns for the entries
ASP.NET Design Issue: what is the best asp.net control for creating a table with 15 properties?
214 Views Asked by Mohammed Al-Ali AtThere are 3 best solutions below

If you're looking to use the edit features of a data control, you could create a custom item template for your data control (be it a gridview or whatnot) that has a table and each of the properties (I assume all 15 are conisidered 1 row of data). Bind your single row to the data control and it should work. You could even have different template views for display and editing using the templates.

I would use a more liberate approach and code the fields my self into the view you'd like.
At first it might take more time, but after that your would be able to control the look of it much quicker and easily.
Using a listView you can build your edit/input gui as you'd like - a table or any other way. If really must divide into 2 columns - you could just put a label and then the field just underneath it. 7 on one side and 8 on the other.
I'm not sure that a
ListView
makes sense from your description. Are your administrators updating the same properties on different objects? Like most of the ASP.NET controls in its class -- theRepeater
andGridView
are other similar examples -- theListView
is meant to create several rows of identical information based on an HTML template you provide.If your administrators are creating or updating:
ListView
,Repeater
, orGridView
would be fine.TextBox
,HtmlSelect
orDropDownList
,CheckBox
, etc.)