Working with query strings
In many cases we write our ASP.NET logic around query strings in order to show the right product page or what not. The first thing we do is to check if the query string exists in the first place before we start using it...
In many cases we write our ASP.NET logic around query strings in order to show the right product page or what not. The first thing we do is to check if the query string exists in the first place before we start using it...
Today, I was playing around with HTTP request headers and for some reason started thinking about how limited information they provide about the requesting browser. All they really provide is the user agent string which...
In the good old .NET 1.x days where Generics wasn’t born yet, the ArrayList was the class to use for just about any type of collection. It was much easier to use compared to an array of objects and it did the job very...
URL parameters or query strings are often used to carry information that can be used by hackers to do identity theft or other unpleasant things. Consider the URL example.com/?user=123&account=456 and then imaging what a...
Whenever you use a Button or LinkButton it is because you want to be able to do a postback when it is clicked. The same could be the case for CheckBox or DropDownList etc. but then you need to set the AutoPostback...
Most websites include a meta-tag that tells the browser what content-type the document is. It looks like this: < meta http-equiv ="Content-Type" content ="text/html; charset=iso-8859-1" />> All ASP.NET web applications...
During the years I’ve seen a lot of different ways of commenting code – some good and some bad. My personal favourite way of commenting code is by using the XML comment feature of C# and VB.NET, but the important part of...
I always use google.com in my code samples as a way to show an example domain or URL. That’s because I wasn’t aware that there is a dedicated domain for use in samples which is'n available for registration. Check out...
Today, I ran into an issue regarding the way numbers are parsed in different cultures, which resulted in very wrong numbers. The problem begins when your web application is set to automatically resolve the culture...
Today, I ran into a strange little issue regarding the System.Uri class that took me too long to figure out. The Uri class has a property called Query that, according to the documentation, returns everything from the "?"...