IE is the slowest AJAX browser

Feb 28, 2006
I really hoped that IE7 with it's new XMLHTTP engine (AJAX engine if you will), would out perform the old IE 6 by far. IE 6 is the slowest of the main browsers out there. Firefox and Opera is much faster processing AJAX. I really don't know why. Is it the transport to and from the server or is it simply just the html rendering performed by JavaScript? Maybe it's the DOM handling? I don't know. The end result on the other hand, I know very well. I'm an IE man and have... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

The old confirm button trick

Feb 27, 2006
You have probably at some point clicked the wrong input button on a web page, and something bad happened. You deleted the wrong user, submitted to the wrong newsletter or something similar. Wouldn't it have been nice if you had been asked to confirm a critical decision like that? In ASP.NET it is so easy to create functionality around post backs caused by input buttons or similar click-controls. This is also the reason why it is important to let the user confirm actions to av... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Format the size in bytes

Feb 26, 2006
Earlier today, I posted a method that returns the total size of a directory, including all subdirectories. It returns the bytes and not kilobytes, megabytes or gigabytes, so I write a little formatting method to do just that. private string SizeFormat(float size, string formatString) {     if (size < 1024)         return size.ToString(formatString) + "bytes";     if ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Calculate the total size of a directory in C#

Feb 26, 2006
For some reason, you cannot retrieve the total size of a directory in .NET, including subdirectories, without a workaround. I always found it odd, that some of the most basic features is not implemented in the .NET CLR by default. The list is very short though, since the CLR is huge. I already wrote about the missing Visual Basic functions in C#. Here is another little helpful method that returns the total size of a directory in bytes private double size = 0; ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Aardvark'd vs. The Code Room

Feb 26, 2006
My boss bought the DVD Aardvark'd from Joel Spolsky’s company Fog Creek. It’s about the development process of a software product, and it was meant to be an inspiration for us developers. I watched the whole thing with English subtitles, because the sound was so poor. Man, it was boring. I thought it was all about software and development and the .NET Framework. I was so wrong. It was a reality show about some college guys living and growing tomatoes together. Sure, there... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Usability vs. accessibility

Feb 22, 2006
Most people are not recognizing the possibilities of an accessible website. They do however see the benefits of usability. This is a start, because accessibility IS usability. Usability IS NOT accessibility.  When developing a website, the customer would demand it to be usable but will give no instructions whether or not it to be accessible. The customer cannot see the benefits of accessibility, because if you sell bicycles you probably haven’t got any blind or ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Accessibility from within

Feb 21, 2006
Accessibility is an abstract concept for the average web designer/developer, because he or she has never needed accessible web pages. A lot of people say that we all benefit from pages made accessible (here's one). One good example of this is keyboard shortcuts (accesskeys) and tab indexes. In my opinion it is also the only visible benefit of accessibility for people without the need, but that’s mostly because it’s good usability. I have always been promoting web stan... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Override the html form in ASP.NET for URL rewriting

Feb 20, 2006
If you are using URL rewriting, the ASP.NET HTML form tag doesn't support it. You have to override the form tag in order to make it work. It was a bug in ASP.NET 1.x and still haven't been fixed in 2.0. Here is the class I use when doing URL rewriting. using System; using System.Web; using System.Web.UI; public class Form : System.Web.UI.HtmlControls.HtmlForm {  protected override void RenderAttributes(HtmlTextWriter writer... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Serialization helper class in C# 2.0

Feb 19, 2006
I recently faced the challenge of creating the functionality that allows a class to be saved to disk. Normally I would use databases or other structured format like XML, but this time, the classes were invalid. Invalid in the sense of not having all its properties set and therefore wasn’t fit for saving to any structured data store. Default values to the properties of the class were not an option. Serialization was the way to go. I knew that. XML serialization was not an ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Client Callback and Page.IsPostBack

Feb 17, 2006
I just spend ½ hour trying to find out, why my client callbacks where executing code inside the if (!Page.IsPostBack) region of my Page_Load method. It turns out, the Page class in .NET 2.0 has now got a new property called IsCallback. I then changed my if (!Page.IsPostBack) to if (!Page.IsPostBack && !Page.IsCallback). You learn something every day. The client callback feature of .NET 2.0 is really well implemented. If you haven't tried it yet, you should. It wor... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.