Home > Articles > Web Development > ASP.NET

Mack & Seven's ASP.NET Tips

  • Print
  • + Share This
Experts Donny Mack and Doug Seven share some useful tips about ASP.NET.
Donny Mack and Doug Seven are the authors of Programming Data-Driven Web Applications with ASP.NET (Sams, September 2001, ISBN 0672321068).
Like this article? We recommend

Like this article? We recommend

  1. Turning Off Features You Don't Use

    ASP.NET enables you the ability to turn on and off features that you don't use on either a page or application wide basis. A couple examples that are expensive that should be turned off if you aren't using them follow:

    Session State - if your web application doesn't use session state (sessions) you have the ability to disable sessions.

    View State - server control view state (maintaining a controls values on round trips to the server automatically)

  2. Minimize Round Trips to the Server

    Try to minimize round trips to your server. Every round trip adds stress on it. Features like form validation should be done on the client side whenever possible. Take advantage of the Validator controls - that's what they are for! Sure validation occurs on the server regardless of fact that they have already been validated on the client, but that is for your protection against hackers bypassing the client side JavaScript, but for 99.99% of users this will minimize posts back to the server to one.

  3. Use the SqlDataReader or OleDbDataReader instead of the DataSet whenever possible

    Whenever it is applicable use either the SqlDataReader or OleDbDataReader for a fast forward-only bindable data retrieval object. Readers use Tabular Data Stream protocol (TDS), to read a data stream directly from your database connection. TDS packets are created by SQL Server to transfer requests and responses between itself and the client and are sent via TDS. Objects like the DataSet need a "Bridge" to read data from a data source. The DataSet depends on either the SqlDataAdapter or OleDbDataAdapter retrieve data. These adapters in turn use one of the DataReaders to read the data into the DataSet.

  • + Share This
  • 🔖 Save To Your Account