I'm trying to convert a windows app to ASP.NET using VS2005. I have
some web experience, but not much. 99% of the time if I need to
display data in a table in my windows apps I use a ListView object and
populate it manually using code like this:
ListView1.Items.Add("Jones")
ListView1.Items(ListView1.Items.Count - 1).SubItems.Add("123")
The result of this code would be a row added to the ListView like
this:
Jones 123
I have had terrible luck with data bound objects. I hate not having
manual control. There always seems to be a case where a simple SQL
statement is not enough to populate my ListView object (crazy users
maybe?). Am I the only one who likes populating list objects manually?
Anyway here's my question. I'm wondering if there is an ASP.NET
control in VS2005 that works similar to the ListView object (found in
VS2005 Windows Application) and will allow me to manually populate the
list without data binding. Maybe the GridView or the DataList?
bruce barker - 26 Oct 2007 19:11 GMT
see HtmlTable class, for generics solution. you can also just build a
datatable on the fly or use the ObjectDataSource to map to your own object.
-- bruce (sqlwork.com)
> I'm trying to convert a windows app to ASP.NET using VS2005. I have
> some web experience, but not much. 99% of the time if I need to
[quoted text clipped - 18 lines]
> VS2005 Windows Application) and will allow me to manually populate the
> list without data binding. Maybe the GridView or the DataList?
Andrew Faust - 27 Oct 2007 01:19 GMT
You could always manually create a data set that matches the criteria you
need and then bind to that.

Signature
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com
> I'm trying to convert a windows app to ASP.NET using VS2005. I have
> some web experience, but not much. 99% of the time if I need to
[quoted text clipped - 18 lines]
> VS2005 Windows Application) and will allow me to manually populate the
> list without data binding. Maybe the GridView or the DataList?
cr113 - 29 Oct 2007 21:08 GMT
> You could always manually create a data set that matches the criteria you
> need and then bind to that.
That sounds promising. I was wondering if you could do that.
Thanks!
Chuck.