ASP.net

I have a long history of using Microsoft products. Back before Classic ASP was even a language, I used Visual Basic executables and CGI as a web backend. At the time Perl was the dominate language and writing code in the VB IDE vs Perl/Notepad was a no brainer. Then, with the release of ASP and ASP.NET, Microsoft started to dominate the web programming languages.
Read the full article →

Incremental Count Using Alphanumeric Values

by michaelkhalili on October 14, 2009

I’m currently working on a website that needs a URL shortener. In order to have a good shortened URL I must make the most of the path after the domain. The common way to do this, as Bit.ly and others already do, is to have a mix of alphanumeric characters that increment each time a new URL has been created. I’m using Asp.Net and since there’s no built in function or an already published one, I created my own.

This function works by accepting a list of characters to use in the counting process. Each time a new value is needed the function increments the count by going to the next character in the array. I hope to have a lot of traffic so it’s important to be efficient and fast. The resulting code can run thousands of times in just a fraction of a second.
Read the full article →

Remove White Space in HTML Output

by michaelkhalili on September 28, 2009

If you’ve looked at the HTML source of an ASP.NET page you know there’s a ton of extra white space that isn’t necessary. If you’re concerned about page load speed and bandwidth you’ll want to remove all that extra space. Here’s some code you can use to reduce page size by an average of over 10%. I put this in my MasterPage file. Read the full article →