So I had a huge post ready to go about how to use ASP.Net Ajax createDelegate and createCallback functions together to get a function that will keep a property scoped this reference and pass predetermined arguments when I came across this article.  It is a great article about combining the functionally createDelegate and createCallback into a new function called createDelegateCallback.  This is a nice addition to the ASP.Net ajax library.

Posted at 11/12/2008 9:48 PM
Comments [0] - Permalink

A few weeks ago I decided to give Visual Studio 2008 a shot after reading all the good reviews.  I'm now using it as my primary development environment with and overall it is a nice upgrade.  Intellisense feels smarter, the IDE looks cleaner, the web designer is much nicer, and lots of other good stuff.  Unfortunately I have run into a few problems.

Web Deployment Projects - Currently web deployment projects are not supported in VS 2008.  I am a huge fan of WDP, recompiling a web application project not only makes the site load faster (at least on the initial page load) but also simplifies deployment.  It leaves me with a nice clean directory free of .vb or .cs files that I upload with having to worrying about deploying source files.  It also ensures that my aspx pages don't have any parser errors.  For VS 2005 WDP shipped as an add-in and I was hoping it would be included as part of VS 2008, just like Web Application Projects.  After some searching it look like we aren't going to get WDP in VS 2008 until after the final version ships.  Currently the top suggestion on Microsoft connect is for WDP to be included in VS 2008.  Maybe I'm wrong but it seams as if WDP isn't a very complex add-in, its just a wrapper around asp_merge.exe 

Microsoft Visual StudioBusiness Intelligence Projects - It looks like SQL Server Report Services projects (*.rptproj files) aren't supported either.  You get a lovely error message that lets you know that doesn't sound very optimistic about getting these reports to open in VS 2008.  My guess is I'll have to wait for SQL Server 2008 and will then be forced to update my sql server in order to use my development tools.

All in all I'm a VS 2008 fan, but its still in beta and it shows.  I rarely have major problems, like a complete crash, but the smaller issues can still be bothersome.   It is great thought that Microsoft is getting these beta versions in the hands of developers, hopefully in an effort to make a better final product.

Posted at 9/19/2007 11:14 PM
Comments [0] - Permalink

While working on a dasBlog bug report I found an interesting "feature" in ASP.Net 2.0.   There are a few controls on the configuration page that can be enabled on the client side via JavaScript.  This worked fine and dandy in 1.1 but in 2.0 it stopped working.  The controls that were enabled on the client side never had any value after postback (in this case it was a CheckboxList). 

After first thinking it had something to do with how dasBlog dynamically loads the configuration usercontrol dynamically it was time to dig into the toolbox for the trusty reflector.  It turns out that 2.0 won't load the postback data of a checkbox list (or a listbox or dropdownlist) if the control is not enabled. In 1.1 the control's postback data was always loaded.  Since the controls were being enabled on the client side and not on the server side the postback data was never loaded.

The easiest way to solve the problem is to enable the checkbox list before the postback data is loaded (OnInit or Page_Load).  If needed you can still disable the control later in the page lifecycle.

Posted at 7/16/2007 10:37 PM
Comments [2] - Permalink

I was browsing the CodePlex website (dasBlog is considering switch from SourceForge) and saw there was a new release of the Ajax Control Toolkit.  It looks like the new build (10606) has quite a few bug fixes.  If you haven't checked out the controls its well worth the time.  Even if the controls don't do exactly what you are looking for they provide a great example of how extenders work and the AJAX Extensions in general.

Posted at 6/7/2007 1:03 AM
Comments [0] - Permalink

Well I finally jumped on board and gave Ruby and Watir a try and boy was I impressed. I’m somewhat ashamed to say that I’ve yet to dive into the TDD/Unit test world (I’m currently working on one of those projects that was due a month ago and can’t afford to let it slip any farther, but don’t worry, unit test are planned for version 1.1) but with Watir I can at least now quickly setup some basic UI testing.

Scott Hanselman created a cool C# program called WatirMaker that recorded your actions in IE and generated a Watir script. It was later converted to native Ruby by Michael Kelly and John Hann. Needless to say this makes writing unit test for your Web UI much faster. I decided to put my ruby skills to the test (ok so this stuff was easy but hey, it was my first attempt at ruby) and make a few improvements to the script.

Here is the new script and here is a list of changes I made:

  • Renamed “ie.” to “browser.” in the output to be more FireWatir friendly
  • Added ability to control the output of Debug and Warning Messages
    • wm.setDebugLevel(1) makes it only output warning messages, level 2 includes debug messages
  • fixed "Unknown property or method `document'" errors
    • the original script had a capital “U” by my system had a lower case “u” in the error message so my output scripts had tons of “unknown property or method `document'” printed in the output. I just removed the “u” completely from the error matching to it will now work if the error message regardless of case
  • fixed outputting "browser.goto('javascript:'';')"
    • not sure if this was an issue only on my system or not but I was sometimes getting "browser.goto('javascript:'';')" in the output so I just check for that string before printing the output
  • added support for link identification by text instead of index
    • in the original version when you clicked on a link it would output something like “ie.document.all[ '56' ].click” now it reads the innerText of the <a> tag and outputs “ :text, 'The Link Text' ).click”
  • added support for regular expression generation of like id values
    • if WatirMaker is going to use “:id” as the “how” and the “what” contains a “_” then it uses a regular expression match of everything after the last “_”. This makes generating scripts for pages easier because then if the name of a container changes (like a master page) your script will still work. In cases where there are multiple controls with the same id but different containers you will have to hand tweek the output to get the results you expect.
    • Original output: ie.text_field( :id, 'ctl00_cphBody_txtUsername' ).set( 'username' )
      New Output: browser.text_field( :id, /txtPassword$/ ).set( 'password' )

I tested the new script on Windows XP MCE (which is really the same as XP Pro) using IE 7 beta 3.

If you have any problems or suggested improvements feel free to leave a comment or send me an email. My next improvement will be to have WatirMaker output ruby unit test.

UPDATE: WatirMaker is now hosted on  Here is a direct link:

kick it on

Posted at 7/23/2006 11:21 PM
Comments [2] - Permalink

I figured out the problem to my Visual Studio 2005 memory issue awhile ago and forgot to post about it.

The sample solution that I created to reproduce the problem included several strongly typed ArrayList generated with code smith (I know I should be using generics but when I found the problem it was in a 1.1 project converted to 2.0 that had too many generated strongly typed ArrayList in place to replace with generics versions). It turns out that it wasn’t the ArrayList that was causing the problems but the XML comments . I found a bug report that describes the problem:

It looks like there is now a hotfix out to fix the problem. KB917452 describes the problem and you can get a hotfix if you call in to Microsoft. That hotfix also includes the hotfix for KB915038 that fixes a bunch of VB Compiler problems. I have the compiler hotfix installed (fixed a separate issue I was having) but have not tried the newer hotfix yet, I instead removed all my xml comments from my generated code and my VS memory consumption is way down.

On a side note Microsoft was very helpful in fixing the problem. I initially though it was a Web Application Project problem and the team replied almost instantly when I emailed about the problem. When I called Microsoft to get the hotfix for KB915038 they were quick and helpful.

Posted at 7/23/2006 10:40 PM
Comments [0] - Permalink

I have recently moved a large project form VS 2003 to VS 2005 using the new Web Application Project Add-In from Microsoft (Details at ScottGu's Blog here).  All went well and VS 2005 is for the most part great. 

However there is one big issue I have with VS 2005.  With one specific solution I'm using it is using LOTS of memory, sometimes my virtual memory goes over 1GB, sometimes up to 2GB.

Some details are over at the forums here.

I was able to reproduce the problem with a very small solution with just a Web Site Project and a Class Library.  The example solution is attached.  You can open and close the default.aspx page and every time you open it the memory goes up, but when you close the file the memory does not go down.

MS is looking into the issue (they have been very helpful) and I'll post any updates as they arise. (170.5 KB)
Posted at 2/24/2006 1:34 AM
Comments [1] - Permalink