Hi, should I use the data components like SqlDataSource/ObjectDataSource? Or
using coding by hands like below?
Page_Load:
ds = SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure,
"sp_eris_wilbor_pedido_consulta", arParms);
grd.DataSource = ds;
grd.DataBind();
Any pros/cons using one over other? What you suggest?
Thanks
VS 2005 asp.net 2.0 C#
Mark Rae [MVP] - 21 May 2008 18:19 GMT
> Hi, should I use the data components like SqlDataSource/ObjectDataSource?
> Or using coding by hands like below?
[quoted text clipped - 6 lines]
>
> Any pros/cons using one over other? What you suggest?
It really comes down to personal preference.
I never go anywhere near the DataSource objects because I prefer to use my
own DAL.
For the same reason, I never use the Validation controls because I have my
own set of JavaScript validation routines which give me much more control...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Jordan S. - 22 May 2008 07:58 GMT
The data components like many included components are like training wheels
on a child's bicycle. They are helpful when first learning, but as soon as
you know the basics, then they only get in the way.
with hand-coding you get more control, plus when something goes wrong you
*can* fix it and don't have to deal with a broken black box that is the
pre-packaged component.
The Law of Leaky Abstractions
(http://www.joelonsoftware.com/articles/LeakyAbstractions.html) is relevant
to your question. Components abstract many details in an effort to help you,
but you need to understand the underlying realities once things go wrong.
-HTH
> Hi, should I use the data components like SqlDataSource/ObjectDataSource?
> Or using coding by hands like below?
[quoted text clipped - 10 lines]
>
> VS 2005 asp.net 2.0 C#