Groups | Blog | Home
all groups > asp.net datagrid control > february 2007 >

asp.net datagrid control : question about DataSourceMode


Dan
2/8/2007 10:40:57 AM
Hi,

i defined a datalist and a datasource like this:

<asp:DataList ID="DataList1" runat="server">
......
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:cat %>"
SelectCommand="select * from dbtable"
</asp:SqlDataSource>

Now i discovered the property DataSourceMode in the tag <sqldatasource> with
two options: datareader and dataset.
My question is: i tried both without seeing any difference. So what's the
purpose of this, and what is then used by default?

Thanks
Dan

Eliyahu Goldin
2/8/2007 12:31:31 PM
The modes differ by the controls used for data access. Use datareader mode
if you need read-only recordser with no paging or sorting. It is much
lighter than the dataset mode. The default is dataset.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


[quoted text, click to view]

Dan
2/8/2007 6:19:54 PM
Thanks

"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.org> schreef in
bericht news:%235Ozix2SHHA.1016@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button