Programming practices

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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!!

.



Relevant Pages

  • Re: Programming practices
    ... Custom Objects and Tiered Development II // 2.0 ... because I have quite a few web applications that use a lot of SQL ... string _productName = sRead.GetValue.ToString; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Writing an exception log an opening it with Notepad.exe
    ... I have a situation where I am looping through a DataTable and extracting values from that DataTable and inserting them into a SQL database. ... I added an Exception handling routine that basically has a running string that adds errors to the string if they happen. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ntext formatting
    ... > I have an ASP page that submits a form to a SQL database. ... > textarea that submits to an ntext field. ... When I output this to an ASP ... > was entered but when it is outputted to the page, it is still one string. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Fuzzy Searching a Database
    ... Ruby and a SQL database. ... # Determine Levenshtein distance of two strings ... cost = 0 ...
    (comp.lang.ruby)
  • Re: puting a hyperlink in aspx..
    ... naijacoder naijacoder typed: ... > So i want to have both the URL and the (ProductName) both populated ... If you want to retrieve a string, as a final result, this is a simple way to ... collection an Hyperlink WebControl: ...
    (microsoft.public.dotnet.framework.aspnet)