Friday, February 15, 2008

To save you from beating your head against a keyboard

I spent about 2 hours trying to figure out why I was getting a message stating "'AJAXControlToolkit' is Undefined" on my client's production box when the development box worked fine. After digging around on the internet I found there can be several reasons for this.

My answer was divined from this post. I noticed that the server date was off, set a few months behind and that caused caching to never load the dll. Apparently an object won't load if its creation date is beyond the current date.

Wednesday, February 6, 2008

Single Selection Radio Button in a Gridview

Wow, who thought this would be that difficult. There's a GroupName attribute in the asp:RadioButton control yet it doesn't group anything. Why? Because when the GridView is rendered it puts a bunch of other junk (related to parent controls) in the name and id fields.

I found one way to do it here (which uses no AJAX):
Here's the post that told me how to do it.

A far cleaner way to do it is to use the ASP.NET mutually exclusive checkbox. I used the Control Toolkit for ASP.NET 2.0 (the older version).

Here's the sample and here's the download

By the way, if you're new to ASP.NET AJAX make sure you include the web.config info from the sample project into your own code. And also make sure you've installed the ASP.NET AJAX Extensions.