Dave Ward

Subscribe to Dave Ward: eMailAlertsEmail Alerts
Get Dave Ward: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by Dave Ward

Dave Ward's "Encosia" Blog Hot on the heels of the recent ASP.NET AJAX roadmap, Bertrand and team have released a limited preview of the new AJAX functionality coming in ASP.NET 4.0. To see how the new functionality stacks up, I decided to recreate my recent jTemplates example, using only ASP.NET AJAX and its new templating features. Eventually, I settled on using the DataView class, which offers more advanced, repeater-like functionality. Having successfully completed the exercise, I thought it seemed like something that you might find interesting too. The solution boils down to four easy steps: Creating a page method to return JSON data. Setting up a ScriptManager to coordinate script and page method access. Defining the client-side template that will render the JSON data. Using JavaScript to render the template, using the page method’s return. A familiar page me... (more)

A breaking change between versions of ASP.NET AJAX

When working directly with JSON serialized ASMX services, be it via jQuery, pure XmlHttpRequest calls, or anything else other than the ScriptManager, one question inevitably arises. That question is of the inexplicable .d attribute that appeared in ASP.NET 3.5. What is it? Why is it there? In this post, I’ll use both a 2.0 and a 3.5 example ASMX web service to illustrate exactly what’s going on. I’ll also show you why it’s a good change. An example Following a concrete example always helps to better clarify these things. For that purpose, let’s assume that we want to call a web ... (more)

Review: The best JavaScript book I’ve read

Having used JavaScript for over a decade, I’ve read many books covering the language. Some focused primarily on syntax. Others recounted and solved specific real-world problems. Learning a language as a set of tasks is one way to get up to speed quickly, but it’s not a very good way to thoroughly learn a language’s nuances and idioms. While those sorts of books certainly have their place, it’s disappointingly rare to find a book which presents JavaScript as the first-class programming language that it truly is. After reading no more than the first page of this book’s preface, I ... (more)

Use jQuery to catch and display ASP.NET AJAX service errors

If you don’t properly handle the inevitable errors in your web applications, you can expect your users to eventually react about like this guy. Since they typically squelch any server-side errors, AJAX service calls are especially problematic. In fact, they rarely even throw a client-side error when they fail. Even when a client-side error is thrown, most users won’t notice it and the ones who do notice won’t know what the error means or what to do next. In fact, I’ve found that even many developers don’t notice client-side scripting errors that occur while they’re debugging th... (more)

PostBack Ritalin v1.0

Thanks to all of your excellent feedback during the months since the last release of PostBack Ritalin, an improved version is ready for release today. With the addition of “disable all elements”, I believe the control is now feature complete, worthy of a version 1.0 release. Notable changes in v1.0 include: Added disable all elements functionality to MonitoredUpdatePanels. Fixed a bug in the WaitImage preloading functionality, that prevented the MonitoredUpdatePanels’ WaitImages from being preloaded. Added both debug and release versions of the JavaScript resource. Your site’s co... (more)