Saving Web Contact Info to a Downloadable Spreadsheet
Usually a website owner has the data from their contact forms emailed to them. But sometimes it can be useful for the site to automatically add that info to an ongoing list of contacts. One way that most people like to be able to see and sort such data is in a spreadsheet. It is quite easy to make a “fake” spreadsheet using an html table that Excel will open like any other .xls file.
Here are the basic steps:
- Create and save a “spreadsheet” which defines the header row
- Upon each contact form submittal, write an html row to that file
Maintaining the Active Tab in TabContainer Control
by George Zheng
Problem
AJAX Control Toolkit has a neat control – TabContainer, to allow you create tabs on your web page easily. However, one problem with it is that when user refreshes the page, it defaults back to the first tab. This will cause user confusion if you have pagination in third tab let’s say. Every time, when user click a page number on third tab. Page get refreshed and it should show third tab, not the first tab.
Solution
The reason refreshed page always show the first tab is, in fact, one of the benefits of the tab control – switching between tabs doesn’t cause a post back. This is a pure client activity. When server prepares the page, it has no idea which tab is the active tab on client side. So server will set first tab as active tab by default.
Read the rest of this entry »
Dispose – Dispose – Dispose – even if it doesn’t do anything
I am always astounded how often I inherit code from smart developers who know what they are doing, but still do not take the time to close and destroy objects. As much fuss is made about memory management and such, this is still an area of coding where laziness abounds.
.Net memory management and garbage collection is intended to free up our need to manage memory at a micro level, but at the same time it is criticized for not freeing up memory fast enough and then blamed for application issues and server slowness. For best practices, never rely on inherent memory management. Where you can, close and DISPOSE!
Read the rest of this entry »