Programming practices
- From: "JoeW" <teh.sn1tch@xxxxxxxxx>
- Date: 16 Mar 2007 12:03:11 -0700
I read a while back that "any object oriented programmer knows not to
store data in the user interface" what exactly does this mean and is
it the same as say querying a SQL database and have the results
returned to a text box or by using a while loop to simply write the
results to a web page as they are read from the datareader? I ask this
because I have quite a few web applications that use a lot of SQL
queries and while reading the values it simple does a Response.Write
with the html markup and values that were retrieved.For instance:
while (sRead.Read())
{
string _productName = sRead.GetValue(0).ToString();
string _productID = sRead.GetValue(1).ToString();
Response.Write("<a href='?id=" + _productID + "'>" + _productName +
"</a><br>");
}
Also is it necessary to use a DataSet in this situation or am I doing
it correctly?
Thanks!!
.
- Follow-Ups:
- Re: Programming practices
- From: sloan
- Re: Programming practices
- From: Jon Davis
- Re: Programming practices
- From: Tom Leylan
- Re: Programming practices
- Prev by Date: Re: Deleting a Record From a Data Table
- Next by Date: Re: Mixed language DLL support outside the IDE?
- Previous by thread: Mixed language DLL support outside the IDE?
- Next by thread: Re: Programming practices
- Index(es):
Relevant Pages
|