7. August 2010 02:28
One of the best uses of asynchronous page processing is for searching. Having a user enter criteria, click search and wait for the page to reload is unnecessary. Most of the page hasn't changed anyway so why waste a trip to the server just to show some search results?
To take searching on step further, why bother having users type in their search critiera and mouse over to a search button. In certain scenarios, it makes sense to provide live search results as the user is typing. This approach works in scenarios where the server doesn't have a lot of overhead when processing the search query. In this case, we're querying a short list of employees so there isn't a lot of processing happening on the server.
The problem with live search results is the unnecessary searches. If a user wants to search for Andrew, we don't want to make six trips to the web service: A, An, And, Andr, Andre, Andrew.
The native setTimeout and clearTimeout functions can be implemented to limit the amount of times we query the server.
See Demo Download Project Files
9. July 2010 16:28
Internet Explorer 6 gets a lot of heat. In most cases, it’s kept alive in corporate environments due to a legacy application that relies on it for functionality like XML data islands or one of the other obscure features. There are some companies that have upgraded past IE6 and have faced their own issues. Applications work but sometime they look a little funky and functionality has minor variations from IE6. This is how I imagine IE Compatibility Mode was born.
Microsoft continued the Compatibility Mode feature into IE8. In fact, now IE8 has several operating modes like Standards Mode, Compatibility Mode and many more. This MSDN article has more information and workarounds beyond the simple solution I lay out below.
When using IE8, developers will notice that their styles are different between their localhost and development environments; tables don’t align correctly, margin & padding vary. The developer will spend a long time checking their stylesheets, caching rules, deployment directories. None of these have anything to do with the problem. The only breakthrough comes when they use the Compatibility Mode while viewing the localhost environment; now the environments look the same although they now are both wrong.
In Internet Explorer 8, when viewing websites in the Intranet Sites security category, Compatibility Mode is automatically enabled.
18. May 2010 15:27
ELMAH (Error Logging Modules and Handlers for ASP.Net) is an open source tool for capturing unhandled exceptions in ASP.Net applications. It consists merely of Web.Config settings, which makes it easy when working with new applications and non-invasive when adding it to existing applications. ELMAH, or a tool like it, are key to centralizing and streamlining support within an enterprise.
ELMAH has a number of data stores. By default, the exceptions are logged in memory which won’t persist between application restarts. For the enterprise environment, there are database modules that will store the exceptions in SQL Server or Oracle databases. Database scripts are included to create the table and stored procedures. We'll use SQL Server in this walkthrough.
8. May 2010 07:30
The HTML List Box is a multi-column select box that mimics the functionality of a list box in a thick client application. The user is able to select and deselect a number of items from what appears to be a select box. In reality, the box is a table within a div which has a set height and an overflow scrollbar. JQuery handles the hovering and selection of the list items. The radio buttons allow the user to select a batch of items within the list. In this case, countries can be selected by continent.
See Demo Download Project Files