DotNet42 - The Answer to Your .NET Question
   
Home Blogs Groups Hot Topics Latest Topics

 
 

Latest Blogs   

Interesting ASP.Net 3.5 website - Chop or Champion
Alex Campbell - 13.07.2008 14:08:00

Some friends of mine have just launched an interesting site.  It's called Chop or Champion (http://www.choporchampion.com), and it is designed to cash in on Australia's love of talking about sport.  Users can vote and comment on who should be in or out of various professional sporting teams, decide who the greatest players of all time are in various sports, and create teams and player lists of their own.

I'm not even remotely interested in any form of sport, but I have had a click through the site and I'm quite impressed from a technological point of view. Everything is AJAXed, the voting integrates cleverly with the comment functionality, and the design has that very nice Web 2.0 feel.  It's worth signing up and chopping/championing players from a few teams just to play with the interface.  The interface for creating teams and players is also very slick.

The site was the first project these guys have done using VS2008 and ASP.Net 3.5.  Apparently the many small productivity enhancements in 2008 and 3.5 combined to make building the site much more fun (it is essentially a hobby for them at this stage) and also made the build significantly quicker.

 
Interesting new ASP.Net 3.5 website - The Chopping Block
Alex Campbell - 11.03.2008 10:53:00

Some friends of mine have just launched an interesting site.  It's called The Chopping Block (http://www.choppingblock.com.au/), and it is designed to cash in on Australia's love of talking about sport.  Users can vote and comment on who should be in or out of various professional sporting teams, as well as decide who the greatest players of all time are in various sports.

I'm not even remotely interested in any form of sport, but I have had a click through the site and I'm quite impressed from a technological point of view. Everything is AJAXed, the voting integrates cleverly with the comment functionality, and the design has that very nice Web 2.0 feel.  It's worth signing up and chopping/championing players from a few teams just to play with the interface.

The site was the first project these guys have done using VS2008 and ASP.Net 3.5.  Apparently the many small productivity enhancements in 2008 and 3.5 combined to make building the site much more fun (it is essentially a hobby for them at this stage) and also made the build significantly quicker.

 
Interesting new ASP.Net 3.5 website - The Chopping Block
Alex Campbell - 11.03.2008 10:53:00

Some friends of mine have just launched an interesting site.  It's called The Chopping Block (http://www.choppingblock.com.au/), and it is designed to cash in on Australia's love of talking about sport.  Users can vote and comment on who should be in or out of various professional sporting teams, as well as decide who the greatest players of all time are in various sports.

I'm not even remotely interested in any form of sport, but I have had a click through the site and I'm quite impressed from a technological point of view. Everything is AJAXed, the voting integrates cleverly with the comment functionality, and the design has that very nice Web 2.0 feel.  It's worth signing up and chopping/championing players from a few teams just to play with the interface.

The site was the first project these guys have done using VS2008 and ASP.Net 3.5.  Apparently the many small productivity enhancements in 2008 and 3.5 combined to make building the site much more fun (it is essentially a hobby for them at this stage) and also made the build significantly quicker.

 
LinkButtons in UpdatePanel cause full postback unless you give them IDs
Alex Campbell - 09.03.2008 02:25:00

After tearing my hair out for half an hour, I have just figured out the painfully simple solution to a frustrating problem with UpdatePanels,Repeaters and LinkButtons.

The scenario: you have a Repeater in an UpdatePanel with LinkButtons in each RepeaterItem.  The LinkButtons fire Repeater.ItemCommand.  The problem is that every time you click on the LinkButton the page does a full postback - defeating the purpose of the UpdatePanel.

The solution: put IDs on your LinkButtons.  All of a sudden your LinkButtons are firing nice async partial-page postbacks.

 
Facebook says getfirefox.com
Alex Campbell - 02.03.2008 10:24:00

I was just checking out how something works in Facebook's IE7 stylesheet, and found the first few lines amusing:

/*  ------------------------------------------------------------------------
                    Facebook | IE7/PC Hacks | getfirefox.com
    ------------------------------------------------------------------------  */

 
Infuriating Windows Server 2003 SP2 behaviour
Alex Campbell - 02.11.2007 04:44:00

<rant> 

I just added two new servers to our hosting AD domain via Remote Desktop.  After rebooting, I could no longer Remote Desktop to or even ping the machines.

So I get in a taxi, go in to the datacenter, log in to the machines locally, and discover that Windows has decided to enable its firewall (and block all remote connections).

This new 'feature' just wasted nearly 2 hours of my day.  And for what?  I am all for 'secure by default' but this is taking it way too far.

</rant>

 
Dell XPS M1330 review
Alex Campbell - 28.10.2007 03:14:00

Last week I ordered a Dell XPS M1330 to replace my old Inspiron 9400 as my main development machine at work.  I thought I'd put together some first impressions for anyone who is interested.

I ended up ordering the model with the WLED screen, 2ghz Core 2 Duo, 4GB RAM, NVIDIA GeForce 8400M GS, and the slower 250GB hard drive.  The machine arrived within about a week and came with a few nice goodies like noise cancelling headphones.

Sitting next to the Inspiron 9400 on my desk the M1330 doesn't look all that small.  Dell managed to fit a full-size keyboard in the M1330 which I thought was quite impressive - in fact it is much nicer to type on than the 9400's keyboard.  You can tell from a looking at the two machines side by side that the M1330 is much better built - it's metallic finish and compact design really stand out next to the 9400 and the crappy IBM Thinkbooks that pervade our office.

The machine came with Dell's standard Vista Business image and all of Dell's standard bloatware.  As soon as I powered it on, I realised that the whole right hand side of the fancy new WLED screen was covered in horizontal white streaks.  The machine is usable but frustrating - I called Dell's tech support department and they agreed to send out a technician to replace the screen.  They offered a full replacement but that would have taken much longer than just getting the screen replaced.

I re-installed Vista without the bloatware and found that the machine randomly "white-screened" every 10 minutes or so.  The only way to get back into Windows is to fully reboot the machine.  So I got back on the phone to the idiots at Dell and with a bit of forceful reasoning I got them to agree to send out a new video card with the tech who is coming to replace the screen.

Despite the broken screen and random crashes I still love using the M1330.  It is just as fast as the 9400 but you can pick it up with one hand.  It weighs in at about half what the 9400 weighs in at, so you can comfortably sit with it on your lap or carry it to a meeting under your arm.

Also the battery life is incredible.  The WLED screen uses much less power than LCDs so the M1330 with the 9 cell battery I ordered lasts for about 3.5 hours.

Pros

- extremely light (1.78 kg)
- great battery lfie
- fantastic WLED screens
- sleek and sexy design
- slot loading DVDRW, just like the Apple Macbook Pro

Cons

- no DVI outputs (but it does have HDMI)
- WLED is quite flimsy (and I think probably very prone to breakage)
- the touchpad is a little too small
- the buttons at the top are hard to press and don't give any feedback
- Dell don't seem to have quite figured out quality control on this model yet

In conclusion, I would recommend this laptop to anyone looking for a powerful and light laptop that is enjoyable to use.

 
Office Space - must watch
Alex Campbell - 28.10.2007 03:11:00

I've just watched Office Space for the first time.  Although it is somewhat dated, it is still incredibly funny and relevant to anyone who goes to work in an office every day.

There are so many cultural references that now make sense to me.  I now know what people are talking about when they ask about "TPS reports" and I understand why there is a guy in my team who wears a "PC Load Letter" t-shirt.

 
Christmas shopping made easy with ASP.Net 2.0 and Myer
Alex Campbell - 18.10.2007 07:17:00

We have just launched an e-commerce site for Australian retailer Myer.  I'm very excited about the site and plan to do most of my Christmas shopping there! 

The site uses a custom e-commerce engine we developed internally for this project.  It is based on the ASP.Net 2.0 and SQL Server 2005 platforms.  It also uses quite a lot of client-side stuff to make the shopping experience very slick.  The Myer Gifts website - enjoy.

 And here are a few helpful "helper" utility methods we've come up with over the last month:

public static class Utilities

{

      public static void DisableCache(HttpResponse httpResponse)

      {

            httpResponse.Cache.SetCacheability(HttpCacheability.NoCache);

            httpResponse.Expires = -1;

            httpResponse.ClearHeaders();

            httpResponse.AppendHeader(@"Cache-Control", @"no-cache"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"private"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"no-store"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"must-revalidate"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"max-stale=0"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"post-check=0"); // HTTP 1.1

            httpResponse.AppendHeader(@"Cache-Control", @"pre-check=0"); // HTTP 1.1

            httpResponse.AppendHeader(@"Pragma", @"no-cache"); // HTTP 1.1

            httpResponse.AppendHeader(@"Keep-Alive", @"timeout=3, max=993"); // HTTP 1.1

            httpResponse.AppendHeader(@"Expires", @"Mon, 26 Jul 1997 05:00:00 GMT"); // HTTP 1.1

      }

      public static void AddMetaTagRobotsNoFollow(Page sourcePage)

      {

            Utilities.AddMetaTag(sourcePage, @"robots", @"NOFOLLOW");

      }

 

      public static void AddMetaTagRobotsNoIndex(Page sourcePage)

      {

            Utilities.AddMetaTag(sourcePage, @"robots", @"NOINDEX");

      }

      public static void AddMetaTag(Page sourcePage, string name, string content)

      {

            HtmlMeta htmlMeta = new HtmlMeta();

            htmlMeta.Name = name;

            htmlMeta.Content = content; 

            sourcePage.Header.Controls.Add(htmlMeta);

      }

      public static string RemoveItemsFromQueryString(NameValueCollection queryString, params string[] itemsToRemove)

      {

            List<string> items = new List<string>();

            foreach (string item in itemsToRemove)

            {

                  items.Add(item.ToLower(CultureInfo.InvariantCulture));

            }

            string s = string.Empty;

            for (int i = 0; i < queryString.Count; i++)

            {

                  if ((queryString.GetKey(i) != null) && !items.Contains(queryString.GetKey(i).ToLower(CultureInfo.InvariantCulture)))

                  {

                        s += queryString.GetKey(i) + '=' + queryString[i] + '&';

                  }

            }

            return s;

      }

     public static string GenerateRandomString(int length)

      {

            // Used for storing the possible characters.

            List<char> possibleCharacters = new List<char>();

            // Add 0 - 9.

            for (int i = 48; i < 58; i++)

            {

                  possibleCharacters.Add((char)i);

            }

            // Add A - Z.

            for (int i = 65; i < 91; i++)

            {

                  possibleCharacters.Add((char)i);

            }

            // Add a - z.

            for (int i = 97; i < 122; i++)

            {

                  possibleCharacters.Add((char)i);

            }

 

            Random random = new Random();

            string result = string.Empty;

            for (int i = 0; i < length; i++)

            {

                  // Get a character out of a random index in the list populated above.

                  result += possibleCharacters[random.Next(0, possibleCharacters.Count)];

            }

 

            return result;

      }

}

 

 
Christmas shopping made easy with ASP.Net 2.0 and Myer
Alex Campbell - 18.10.2007 07:17:00

We have just launched an e-commerce site for Australian retailer Myer.  I'm very excited about the site and plan to do most of my Christmas shopping there! 

The site uses a custom e-commerce engine we developed internally for this project.  It is based on the ASP.Net 2.0 and SQL Server 2005 platforms.  It also uses a fair amount of client-side stuff to make the shopping experience quite slick.  The Myer Gifts website - enjoy!