.net - How do ASP.Net controls read from their data sources? -


i have need display information on pages in way none of standard asp.net controls support. in order this, i've created own controls, , had reproduce of functionality of asp.net form controls - capacity bind number of different data sources.

according documentation, controls can bind data source supporting ienumerable, icollection, or ilistsource interfaces. know can bind controls directly sqldatareader, can't work out interface class conforms allows work. iirc implements ienumerable enumerating columns, not rows.

i want own objects able consume these data sources, , have way of doing (using reflection access properties dynamically, etc), since .net framework this, i'm hoping there's object part of framework, eliminating need me roll own. questions:

1) condition sqldatareader meet allow used data source asp.net controls? 2) there class can iterate on allowed asp.net data sources row row, avoiding need roll own?

i don't know if answers question, can iterate on sqldatareader using dbdatarecord class (and in case ienumerable iterates on rows) e.g. (vb.net):

for each rec data.common.dbdatarecord in myreader    'access fields rec(ordinal) or rec(fieldname) next 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -