"Done is better than perfect."


Trim colums in Sql

Remove white spaces from the beginning and the end of a column : UPDATE TableName SET columnOne = LTRIM(RTRIM(columnOne)), SET columnTwo = LTRIM(RTRIM(columnTwo))




Simple Asp.net Jquery Ajax paging

Following a great post on Encosia here’s a an ajax powered repeater, that uses JTemplates, with paging and the chance of changing the page size, you can download the sources from here : http://dl.dropbox.com/u/3844758/BlogCode/JTemplates.zip.




Asp.net user authenticated after signout.

The Asp.net Membership relies on cookies to store the FormAuthentication ticket of a user, this means that we have to remove the cookie in order to signoff from our application. When an user is logged a cookie containing the encrypted ticket is stored on the client machine: public void CreateUserCookie(string username) { //Expiration of the […]




MARS Rover Exercise in C#

The Mars Rover simulation is one of the most popular tests spreaded by companies wich want to screen candidates with a pratical test. Here’s the requirements: ” The problem specified below requires a solution that receives input, does some processing and then returns some output. You are free to implement any mechanism for feeding input […]




Easy Jquery validation in Asp.net 4

With Asp.net 4 comes a new property named ClientIDMode wich allow us to take control over the control ID rendered client side. The property can be applied at: Page level, all the controls within page will maintain the same ID specified by the developer : <%@ Page Title=”” Language=”C#” MasterPageFile=”~/MyMaster.Master” CodeBehind=”NewFeature.aspx.cs” ClientIDMode=”Static”…. Control level , […]




Easy Asp.net ajax file upload

Here’s a simple way to get file uploading without the widraw of a postback: it is the asp.net implementation (with a few changes) of the following jQuery plugin. An image is uploaded and the form submitted. The submitted form is sent to a custom handler (ashx). The image is saved to a website folder and […]




Get ClientID of an Asp.net control in external js

$(“*[id$=’txtDateFrom’]”)




Asp.net 4 path validation issue

If you encountered the following error message while trying to navigate using a query string “A potentially dangerous Request.Path value was detected from the client (?)” this can be fixed by adding the following on the web.config: <system.web> <httpRuntime requestPathInvalidCharacters=”” /> …….. ……… </system.web>




Sencha Touch, jQuery and WCF

There’s a lot going on mobile friendly web development, after looking around I’ve picked up Sencha Touch as a framework for my UI. I’ve built a sample mixing Sencha Touch and jQuery for the front-end and WCF for the the back-end. You can try at http://www.minalabs.co.uk/.    




Import data in SQL Express Management Studio

One of the restriction of the Sql Express Managent Studio is not allowing import/export of data. To overcome to this limitation we can either download the Sql Server Express Edition Toolkit or we can use the BULK INSERT statement in order to import a file. This will be our document: Lorem ipsum dolor sit amet, […]