Ever so useful: http://www.w3.org/TR/CSS21/selector.html.
Author: Tom Wayson
"Tech" PodCasts
I’m surprised how hard it is to find a good tech PodCast that talks about coding and best practices. I stumbled upon Craig Shoemaker’s Polymorphic PodCast first, and haven’t found anything that comes close to the quality of its content since. I think his show should make it somewhere higher thank #27 on Podcast Alley’s list of top tech podcasts. Of course, I’m going to be biased towards shows that cover the technologies I develop in (.Net, Oracle, etc.) so perlcast and anything with mac in the title are out for me. But half the shows on that list are mostly music (i.e. daily source code).
Too bad the .Net show won’t podcast just because the word "pod" is in the title.
Trimming down that ViewState
I’m developing an ASP.Net site for a client that is very concerned about bandwidth. My first objective is to reduce the size of the hidden veiwstate data returned in the form.
The worst culprits seem to be the data display controls, especially the DataGrid. I found that for displaying small amounts of data in a table (20 rows by 5 columns) the page with a DataGrid returned over twice as much view state data (5,716 bytes vs 2,512 bytes) as one using a Repeater to render the table.
Worse yet, once I started returning larger amounts of data, even the Repeater was generating a heafty amount of veiw state data. Since these pages are essentially run once search result pages, I’ve added the following to the Page directive
EnableViewState=”false”
ASP.Net still returns view state data for the page, but only a small amount. To completely remove it from the page, you have to remove all runat=”server” tags.
The following article also shows how to trim the ViewState data on a control by control basis:
ADO RecordSet performance
This article shows that the GetString method reall is faster than GetRows or iteration.
.Net DataReader vs DataSet performance
DataSets offer disconnected functionality, but DataReaders offer speed according to Why I Don’t Use DataSets in My ASP.NET Applications
By Scott Mitchelle
Files and directories in .Net
This example demonstrates recursively iterating through files and sub-directories in a given directory using the DirectoryInfo class.
Excel output from ASP
- Send unformatted HTML with content type set to application/vnd.ms-excel
- Increase control over formatting and file properties using XML and CSS w/in HTML.
- Writng a CSV response
- Using the file system object to write a text file
- Office Web Components may be the “right” way, but they require a license of Office 2000 to be installed on the web server and that each client have an Office license.
4 Guys From Rolla article on using the OWC to Stream Recordset results as an Excel document. - Several ways to integrate ASP, XML, and Excel – This includes a section on using ASP to Transform an XML-Persisted ADO Recordset into an XML Spreadsheet.
- Soft Artisanns Excel Writer appeaers to be the industry standard third party solution, and surprise, surprise, it costs between $500.00 and $1500.00.
I like the use the GetString method of the Recordset object in some of the above.
C# PDF Class Library
Generate your own PDF documents on the fly!
Generate your own PDF documents on the fly with the Gios Pdf.NET C# code library. I haven’t tried it, but I’m sure this comes in handy for reporting.
Charts in ASP
I’m going to need a chart tool for ASP for a project I am currently working on. A quick survey of what is available on the web yeilded the following:
I’m going to need a chart tool for ASP (classic) for a project I am currently working on. A quick survey of what is available on the web yeilded the following:
- An HTML Bar Chart Class for ASP – Very lightweight, runs in classic ASP using a VBScript class, but supports bar charts only.
- MS Chart Example – A client-side ActiveX chart control.
- Create Snazzy Web Charts and Graphics On the Fly with the .NET Framework – MSDN suggestions.
- WebChart Demo – ASP.Net – A free WebChart class library from a Microsoft developer. [source]
- Dundas Chart – Seems to be the standard comercial charting solution, but it carries a sticker price of $999.00.
More recently, I found Steven C. Orr’s article on Bar Graphs to Go, which is a simple implentation of a bar chart using an ASP.Net control to render a no frills (and no overhead) HTML/CSS bar chart.
PL/SQL Best Practices
Cleaning Up PL/SQL Practices by Steven Feuerstein as published in Oracle Magazine March/April 2004.