Dave Ward's BlogDave Ward's BlogASP.NET, C#, and AJAX.code, ideas, and examples. Articles
Five years of Encosia
2011-12-22 23:50:00 As I ponder the title of this post, I’m conflicted. I clearly remember writing last year?s post and thinking that it didn’t seem like four years could have possibly passed since I started publishing here. As I write this one, I find myself feeling like it’s surely been much longer than five years. I guess ... You've been reading Five years of Encosia, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: 3 years of Encosia, the best of 2009, and my gratitude 4 years of Encosia, and the best of 2010 Announcing the 2010 Encosia Holiday Giveaway More About: General , Years
Using CORS to access ASP.NET services across domains
2011-12-19 07:25:00 Work on client-side applications long enough and it’s just about inevitable that you’ll eventually want to make an AJAX request that breaches the browser’s XMLHttpRequest security restrictions. Limitations on cross-domain requests are great when they’re preventing malicious sites from malfeasing, but are a thorn in the side when they complicate your legitimate applications. Traditionally, direct ... You've been reading Using CORS to access ASP.NET services across domains, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Save yourself some typing when you call ASP.NET services ASMX and JSON – Common mistakes and misconceptions Using jQuery to Consume ASP.NET JSON Web Services More About: Access , Domains
Help me organize my posts about using jQuery with ASP.NET
2011-11-29 20:12:00 One of the longest running themes here has been the compelling intersection between ASP.NET and jQuery . Beginning with my post about using jQuery to circumvent ASP.NET AJAX’s client-side apparatus for calling ASMX services, I’ve been writing about using ASP.NET and jQuery since the Spring of 2008. As these related posts have accumulated over the years, ... You've been reading Help me organize my posts about using jQuery with ASP.NET, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Best of 2008: 5 most popular posts Best of 2007: 5 most popular posts (and contest winners) 3 mistakes to avoid when using jQuery with ASP.NET AJAX More About: Organize , Posts
Learn from my Express.js HTTP status code blunder
2011-11-09 19:33:00 If you’re like me, HTTP status code 200 Object] unknown probably doesn’t ring any bells. Of course, that’s mainly because it doesn’t exist. So, how did I end up with the screenshot above? I’ve been running with scissors again. It was one of the more popular web frameworks for Node.js that I cut myself with ... You've been reading Learn from my Express.js HTTP status code blunder, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Easy incremental status updates for long requests Updated: See how I used Firebug to learn jQuery 4 ASP.NET AJAX Java Script UI methods you should learn More About: Code , Status , Http
Why PhoneGap 1.1.0 broke jQuery Mobile?s back button
2011-10-19 20:01:00 For the past week, I’ve been neck-deep in a challenging project that combines jQuery Mobile and Phone Gap to do some relatively heavy lifting. Though I’ve used both jQuery Mobile and PhoneGap in the past, this recent exercise left me with a few morsels of newly-hard-earned knowledge. Among that education was learning that PhoneGap 1.1.0 breaks ... You've been reading Why PhoneGap 1.1.0 broke jQuery Mobile’s back button, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Disable a button control during postback. A few thoughts on jQuery templating with jQuery.tmpl jQuery 1.6.2 syntax error? You may be the victim of SEO. More About: Back , Button
Resolving an iisnode ?The service is unavailable? 503 error
2011-10-05 21:06:00 I’ve been experimenting with Tomasz Janczuk’s awesome iisnode project lately, in hopes of hosting some of my Node.js sites on IIS. Those sites are running well enough on an Ubuntu VPS currently, but the features that iisnode offers are compelling (and I have unused capacity on one of my Windows servers). Along the way, I ... You've been reading Resolving an iisnode “The service is unavailable” 503 error, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Use jQuery to catch and display ASP.NET AJAX service errors How to improve ASP.NET AJAX error handling ASP.NET page methods are only as secure as you make them More About: Java , Service , Script
Guidance on building real-world HTML and JavaScript apps
2011-09-19 17:27:00 Over the past several months, I’ve been participating as an adviser to an interesting Microsoft patterns & practices effort named Project Silk. I don’t publish posts here about every project I’m tangentially involved in, but I think Project Silk is worth a look if you’re building modern, Java Script -heavy web applications. The project itself is comprised ... You've been reading Guidance on building real-world HTML and JavaScript apps, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Use jQuery to extract data from HTML lists and tables Review: The best JavaScript book I?ve read Display data updates in real-time with AJAX More About: Building , Reading , World
ASP.NET page methods are only as secure as you make them
2011-09-08 18:47:00 One of the most persistent misconceptions about ASP.NET’s page methods is the notion that they have some intrinsic protection against requests that don’t originate from the page where they’re defined. Since a page method’s code resides within a page’s code-behind file, it’s intuitive to assume that those methods benefit from some form of inherent security. ... You've been reading ASP.NET page methods are only as secure as you make them, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Using jQuery to directly call ASP.NET AJAX page methods Why do ASP.NET AJAX page methods have to be static? Using complex types to make calling services less… complex More About: Page , Make , Methods
Use ASP.NET?s HttpHandler to bridge the cross-domain gap
2011-08-02 16:59:00 When you’re developing client-side applications, a problem you’ll almost inevitably have to deal with is how to work with services that reside outside your website’s domain. Though many modern APIs do support JSONP, which is a clever workaround to somewhat mitigate the cross-domain problem, JSONP has its own problems. Worse, if you encounter an API ... You've been reading Use ASP.NET’s HttpHandler to bridge the cross-domain gap, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: AJAX, file downloads, and IFRAMEs The easiest way to break ASP.NET AJAX pages Why ASP.NET AJAX UpdatePanels are dangerous More About: Domain , Cross , The Cross , Query
Highslide JS .NET and PostBack Ritalin open-sourced
2011-07-12 20:49:00 They aren’t the most glamorous projects, but thousands of developers have integrated my Highslide JS .NET and PostBack Ritalin controls into their sites and applications over the years. PostBack Ritalin was even included in Subtext at one point. It’s definitely a great feeling to see your work put to good use (in fact, this motivator ... You've been reading Highslide JS .NET and PostBack Ritalin open-sourced, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: PostBack Ritalin Updated (v0.10) PostBack Ritalin v1.0 Postback Ritalin Update (v0.2) More About: General , Open
jQuery 1.6.2 syntax error? You may be the victim of SEO.
2011-07-06 16:11:00 A reader contacted me this weekend to inform me that jQuery 1.6.2 had broken all of my old examples of using jQuery with ASP.NET services. Not good! How could such a simple update have caused this?! I didn’t really expect that updating from jQuery 1.6.1 to 1.6.2 would break anything, much less break everything. As ... You've been reading jQuery 1.6.2 syntax error? You may be the victim of SEO., originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: What ASP.NET developers should know about jQuery Hear me talk jQuery and ASP.NET on the jQuery Podcast Mastering jQuery now available at TekPub
Save yourself some typing when you call ASP.NET services
2011-06-14 18:17:00 Mea culpa: I may owe your fingers an apology. If you’ve been using my approach for directly calling ASP.NET’s JSON-based services with jQuery , you know that specifying the correct Content-Type on your requests to them is a crucial part of coaxing JSON out of them. However, when I suggested that a Content-Type of application/json; charset=utf-8 ... You've been reading Save yourself some typing when you call ASP.NET services, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: jQuery 1.5′s AJAX rewrite and ASP.NET services: All is well Simplify calling ASP.NET AJAX services from jQuery Using jQuery to Consume ASP.NET JSON Web Services More About: Typing , Call
Using jQuery 1.6 to find an array of an object?s keys
2011-06-08 19:22:00 With the confusion surrounding jQuery 1.6′s changes to .attr() and the addition of .prop(), one of my favorite new features nearly slipped under the radar. The feature I’m referring to is that $.map() now works against plain Java Script objects in addition to arrays. $.map() has always been a useful utility method, somewhat mimicking ECMAScript 5′s ... You've been reading Using jQuery 1.6 to find an array of an object’s keys, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Use jQuery to extract data from HTML lists and tables Use jQuery and ASP.NET AJAX to build a client side Repeater Avoid this tricky conflict between ASP.NET AJAX and jQuery More About: Find , Object
Preserving social sharing counters through a URL change
2011-05-30 00:27:00 I?ve been considering a change in the permalink structure for my posts for some time now. The /yyyy/mm/dd/post-name/ structure I started with is certainly nicer than what WordPress defaults to, but a problem with those dated URLs has emerged over the past few years: link ageism. Link ageism is what I’ve begun calling the tendency ... You've been reading Preserving social sharing counters through a URL change, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: A breaking change between versions of ASP.NET AJAX How I handle JSON dates returned by ASP.NET AJAX More About: Social , General , Change
Hear Joe Stagner and I talk community, business, and more
2011-05-02 19:57:00 Years ago, Joe Stagner was one of the first people at Microsoft that I happened to get in touch with about ASP.NET and the topics I was blogging about here. In fact, he was responsible for the first real bump in traffic my blog received back in 2007. So, when Joe asked me to come ... You've been reading Hear Joe Stagner and I talk community, business, and more, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts: Hear me talk jQuery and ASP.NET on the jQuery Podcast Hear me talk about jQuery on the Polymorphic Podcast Hear us talk about JavaScript on Hanselminutes episode 2^8 More About: Business , Community , General , Talk
Using external templates with jQuery Templates
2010-10-05 20:15:00 Now that jQuery Templates is official and definitely will not include remote template loading, I wanted to publish a quick guide on implementing that yourself. As I mentioned previously, there?s a handy interaction between jQuery Templates? API and jQuery?s AJAX methods that makes this easier than you might expect. In this post, I?ll show you ... You've been reading Using external templates with jQuery Templates, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:A few thoughts on jQuery templating with jQuery.tmpl Use jQuery and ASP.NET AJAX to build a client side Repeater How you can force the Ajax Script Loader to use jQuery 1.4 More About: Java
Understanding jQuery?s impact on Microsoft and ASP.NET
2010-10-04 19:49:00 It hasn?t been easy keeping up with the twists and turns that Microsoft ?s client-side frameworks and libraries have taken in the past couple years. Even today, I still hear from a surprising number of developers that don?t realize the ASP.NET Ajax Library is dead. With that in mind, I?ve been writing an article on and ... You've been reading Understanding jQuery ’s impact on Microsoft and ASP.NET, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:What ASP.NET developers should know about jQuery Mastering jQuery now available at TekPub Alt.NET Podcast – jQuery in ASP.NET
6,953 reasons why I still let Google host jQuery for me
2010-09-15 16:59:00 It?s been nearly two years since I wrote about using Google ?s CDN to host jQuery on your public-facing sites. In that post, I recommended it due to three primary benefits that public CDNs offer: decreased latency, increased parallelism, and improved caching. Though the post has been overwhelmingly well-received, concerns have been raised as to whether ... You've been reading 6,953 reasons why I still let Google host jQuery for me, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:3 reasons why you should let Google host jQuery for you Hear me talk jQuery and ASP.NET on the jQuery Podcast How you can force the Ajax Script Loader to use jQuery 1.4 More About: Java , Host , Reasons
Announcing my new TekPub series, where you call the shots
2010-09-01 17:51:00 Last Friday, the ?final? two episodes of Mastering jQuery went live: Using Custom Events and Upgrading to jQuery 1.4. While we?ll almost certainly add another episode when jQuery 1.5 is released, we?ve covered what we set out to. Weighing in at nearly six hours of video, we covered a wide range of content, and have ... You've been reading Announcing my new TekPub series, where you call the shots, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Mastering jQuery now available at TekPub I’m giving away 10 free months of TekPub this week Hear me talk jQuery and ASP.NET on the jQuery Podcast More About: General , Series , Shots , Call
Hear me talk jQuery and ASP.NET on the jQuery Podcast
2010-08-30 17:10:00 Last week, Ralph Whitbeck was kind enough to have me as a guest on episode #32 of the jQuery Podcast . We spoke about topics including: Research I?ve done on the public CDNs that host jQuery, and why it matters which one you choose Why you should never use a "latest version" reference to scripts on ... You've been reading Hear me talk jQuery and ASP.NET on the jQuery Podcast, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Hear me talk about jQuery on the Polymorphic Podcast Mastering jQuery now available at TekPub Alt.NET Podcast – jQuery in ASP.NET More About: Talk
Don?t let jQuery?s $(document).ready() slow you down
2010-08-18 19:26:00 A couple examples of situations where jQuery 's $(document).ready() may be unnecessarily slowing you down. You've been reading Don’t let jQuery’s $(document).ready() slow you down, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:$(document).ready() and pageLoad() are not the same! 3 reasons why you should let Google host jQuery for you Easily build powerful client-side AJAX paging, using jQuery More About: Performance , Document
Improving client-side development in Visual Studio
2010-07-27 21:02:00 For several years now, I have been consistently impressed with how Microsoft?s developer division gathers feedback and proactively responds. Nearly every time that I?ve participated in a survey or otherwise provided feedback (solicited or not), someone has followed up with me about my specific concerns. In my experience with how other large companies gather feedback, ... You've been reading Improving client-side development in Visual Studio , originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Using an iPhone with the Visual Studio development server Automatically minify and combine Java Script in Visual Studio Use jQuery and ASP.NET AJAX to build a client side Repeater More About: Development
Sometimes, even jQuery can?t save you from yourself
2010-07-07 06:05:00 This post describes a cross-browser problem I had with jQuery that turned out to be my own fault, including a runthrough of debugging process and the eventual solution. You've been reading Sometimes, even jQuery can’t save you from yourself, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Use jQuery and ASP.NET AJAX to build a client side Repeater 11 keystrokes that made my jQuery selector run 10x faster A few thoughts on jQuery templating with jQuery.tmpl More About: Save
Using an iPhone with the Visual Studio development server
2010-06-10 15:10:00 Developing iPhone -optimized portions of an ASP.NET website presents a challenge. More specifically, it?s testing your creations that can be difficult. Apple?s iPhone emulator only runs on Macs and the Windows-based alternatives don?t emulate mobile Safari well. That leaves us using an actual device as the only high-fidelity option for testing. That?s not all bad; especially ... You've been reading Using an iPhone with the Visual Studio development server, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Automatically minify and combine JavaScript in Visual Studio Review: Advanced ASP.NET AJAX Server Controls How I Got Started in Software Development More About: Iphone
ASMX ScriptService mistake ? Invalid JSON primitive
2010-06-01 06:33:00 One group of searches that consistently brings traffic here is variations on the error: Invalid JSON primitive. Unfortunately, the post that Google sends that traffic to doesn?t address the issue until somewhere within its 150+ comments. Today, the topic gets its own post. If you?ve worked with ASMX ScriptServices or Page Methods without ASP.NET AJAX’s ... You've been reading ASMX ScriptService mistake – Invalid JSON primitive, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:ASMX and JSON – Common mistakes and misconceptions ASMX ScriptService mistakes: Installation and configuration 3 mistakes to avoid when using jQuery with ASP.NET AJAX
I?m giving away 10 free months of TekPub this week
2010-05-17 09:25:00 If you follow me on Twitter, this stack of free TekPub trials may look familiar: Each card is redeemable for a one-month membership at TekPub, which allows free, unrestricted access to all of the videos on the site. Of course, that also includes access to my TekPub series, Mastering jQuery. I?ve given many of them ... You've been reading I’m giving away 10 free months of TekPub this week, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:Mastering jQuery now available at TekPub Contribute to open source, get a shot at a free book 3 years of Encosia, the best of 2009, and my gratitude More About: General , Free , Week , Giving
A few thoughts on jQuery templating with jQuery.tmpl
2010-05-03 07:57:00 I spent some quality time with Dave Reed?s latest revision of John Resig’s jQuery .tmpl plugin recently, migrating a small project from jTemplates. Since both the jQuery team and Microsoft team have requested feedback on jQuery.tmpl, I decided to write about my experience using it (as I am wont to do with these templating proposals). Overall, ... You've been reading A few thoughts on jQuery templating with jQuery.tmpl, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:A sneak peak at ASP.NET AJAX 4.0′s client-side templating Use jQuery and ASP.NET AJAX to build a client side Repeater Simplify calling ASP.NET AJAX services from jQuery More About: Java , General , Thoughts , Script
How 30 seconds dropped my bounce rate by 78%
2010-04-23 18:44:00 Blogging about blogging alert! This post is a bit off-topic, but I thought it was interesting. Since many of you have asked me metablogging questions, I thought you might be interested too. An overwhelming majority of people who end up on my site only view a single page per visit. In fact, you?ll probably do ... You've been reading How 30 seconds dropped my bounce rate by 78%, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. No related posts. More About: General , Bounce
PostBack Ritalin v1.1 ? Updated for ASP.NET 4
2010-04-12 17:40:00 As you might notice soon enough, a change in ASP.NET 4?s client-side API breaks versions 0.8 through 1.0 of Post Back Ritalin. Using those older versions of the control with ASP.NET 4 will throw a JavaScript error during BeginRequest and break asynchronous postbacks as a result. PostBack Ritalin v1.1 works around that issue, and is also ... You've been reading PostBack Ritalin v1.1 – Updated for ASP.NET 4, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:PostBack Ritalin Updated (v0.10) PostBack Ritalin Updated (v0.9) PostBack Ritalin v1.0
5 Steps Toward jQuery Mastery
More articles from this author:2010-03-30 08:55:00 Five quick tips that I found valuable while learning jQuery in depth. I learned them the hard way so you don't have to! You've been reading 5 Steps Toward jQuery Mastery, originally posted at Encosia. I hope you enjoyed it, and thanks for reading. Related posts:See how I used Firebug to learn jQuery 11 keystrokes that made my jQuery selector run 10x faster Updated: See how I used Firebug to learn jQuery More About: Java 1, 2, 3, 4, 5 |



