Monday, 30 January 2012

Blog ranking... just for fun

   


Just a quick note, out of the ordinary flow of posts...

I've read a short article a few minutes ago and I can't stop laughing. In the article it is said that if you want to increase the traffic to your blog, you should place at the beginning of every post a photo of a beautiful girl... possibly with a small dress... if any...
I won't put the link of the aforementioned article, so don't ask...

I am just still laughing out loud (and my boss looks at me suspiciously...)

ASP & CSS: highlight selected menu item

   


When creating menus for a web site, it is a good practise to use an inclusion, so that we write the menu only once. When the menu is included on every page, we might need to highlight the selected option in the menu itself.
For example, we can have a menu like:
  • Home Page
  • Option 1
  • Option 2
  • Option 3
When the user selects "Option 2" and load the related page, the menu should look like:
  • Home Page
  • Option 1
  • Option 2
  • Option 3
How can we do it? It's quite easy: we will use some ASP and CSS.

Friday, 27 January 2012

ASP: is the client still connected?

   


I recently wrote a short post about things not to forget when creating ASP document. One of the general tips I mentioned was about checking if the client is still connected, before starting long procedures like complicated server requests (i.e. SQL queries).
In this article we are going to see how to do it with the response object (IsClientConnected).

Wednesday, 25 January 2012

CSS: fixed header and footer

   


Today we are going to create a header and a footer with fixed position. Our page will have a center part which will naturally overflow when needed, while the header and the footer will stay where they are (top and bottom). The content in the central part will eventually go under the header (when scrolled down) and under the footer (if longer than the viewport).
Nothing complicated, but we will need some little CSS tricks.

Let's start.

Monday, 23 January 2012

HTML5: is div dead? Not, really...

   


I must admit I am not a great fan of HTML5. First I've tried to understand the new tags and then I've started using them on new projects, sometimes ago. I even contacted the Doctors on HTML5 Doctor to submit some questions and prepare an interview to be published on the web thought. They were obviously too busy and, even if they initially agreed on the interview, they've never got back to me with the answers.
Anyway, in this short post I will try to explain where the new content formatting tags should be used and how they can replace the div tag... if ever.

Friday, 20 January 2012

SQL: the IN operator

   


The IN operator can be very useful when we need to perform SQL queries where we need to filter the results with more than one possible value.
Just to understand the power of the IN operator,  we need to go back a few steps and see how we usually filter data from a table with the OR operator.


Wednesday, 18 January 2012

Web Development: handheld device emulators

   


In the past months I've made some researches about web development and design for handheld devices. The main problem, as we all know, is that we should have most of the devices sold, just to test how our web sites or applications are displayed on them. Does our newly created web site look just right on an iPad or a Galaxy Tab?

To be sure we are doing things properly, we need to test the web creation, and emulators can be of some help. In this post I gathered all the relevant tools, as a repository for future reference.