Recent twitter entries...

The apprentice needs renaming this year…

Posted in Ramblings | Posted on 16-07-2011

This year we are watching “the business partner”, and it’s as delightfully entertaining as ever. Seems tomorrow is the end of the series and it looks like lots of blood is going to be shed by lord sugars henchmen.


Set parameter value of SqlDataSource to SelectedValue of another page control

Posted in ASP.NET, C# | Posted on 15-07-2011

You have a DetailsView control with edit / add and all the other goodness enabled, but when adding a new record you want a non-visible field to get it’s value from another control like the SelectedValue of a GridView or a DropDownList in the InsertParameters collection of your SqlDataSource just use a ControlParameter instead

<InsertParameters>
    <asp:ControlParameter ControlID="ddlYourList" Name="ParameterName"
        PropertyName="SelectedValue" Type="Int32" />
    <asp:Parameter Name="SomeDetailsViewParameter" Type="String" />
</InsertParameters>

Make Visual Studio 2010 faster and more enjoyable

Posted in Coding | Posted on 13-07-2011

Here are a couple of tips and tweaks that should make your visual studio 2010 experience less of a dragggggg..

Set your visual experience general environment options as follows, I have not noticed any real difference in the prettiness of the IDE but then I mainly develop console and asp.net applications

1) Uncheck Enable rich client visual experience

2) Check Use hardware graphics acceleration if available

Tweak1 500x290 Make Visual Studio 2010 faster and more enjoyable


Set your startup to an empty environment so the beast starts quicker without having to lookup a bunch of RSS feeds and have a think about what has been done recently so you can just get on with what you want to do.Tweak2 500x290 Make Visual Studio 2010 faster and more enjoyable


If you have an active anti virus product on the computer find the advanced setting that enables you to exclude certain files/folders from runtime scanning in my case I exclude the following from my avast scanner.

AntiVirus 430x400 Make Visual Studio 2010 faster and more enjoyable


Sure there are many other software options that can help but these are some easy ones that should make a big difference to your development experience.


Windows BSOD with fastfat.sys and truecrypt container

Posted in Ramblings | Posted on 12-07-2011

Last week I had 10 BSOD’s crashing the hell out of my windows XP machine at work, I knew what the problem was related to though as I had created a new TrueCrypt container which was larger than the one I had been using without problem for two years now.

As my dropbox storage availability was going up, the container holding the data was staying at 4GB so I had to do something as having to move files each day due to the virtual drive filling up was becoming tedious..

I had benchmarked the fastest algorithm as AES which was not the previous one I had been using (twofish) so decided to switch to that so program file access would drag a little less…

So I have a FAT AES 6GB partition and two times a day the machine BSOD’s after years of stability. If you are having blue screens then the starting point is to download the free utility BlueScreenView to check out what those memory dumps contain which pointed out that fastfat.sys was the problematic driver.

BlueScreen 500x391 Windows BSOD with fastfat.sys and truecrypt container


Upgrading TrueCrypt from version 6.3 to 7 and changing the algorithm back to twofish did not help as 10 mins later it happened again.

So two days ago I decided to create a new AES NTFS 6GB partition to remove the FAT driver from the equation and two days on not a single bluescreen… fingers crossed it continues to be stable.

Another freeware program from the makers of BlueScreenView that I used years ago and think is great is ShellExView which you can use to trim the crap out of your right click menus so you can be more efficient with less clutter.


Don’t think that escaping your javascript is secure..

Posted in Coding | Posted on 11-07-2011

A very long time ago I put together some javascript samples on my original site that over the years have attracted literally 100′s of thousands of visitors, two of the most popular pages by far are the one about javascript checkbox validation, and javascript login page…

Believe me I would no longer consider this worthwhile content but for the traffic the pages bring… I just can’t seem to find the time to update the pages, the one about the checkboxes will literally draw 9000 unique visitors every month, I think it’s due to perhaps some powerful ranking sites giving me a linkback years ago when that sort of thing counted more.

I also put in place a little forms collection capture on the homepage of my site with it also being the target url of the login form… yep beginner webmasters who thought that a plain text username/password in a super simple bit of javascript would secure their site had been happily posting me not only the URL where they hosted the script as the referrer, but also a good idea if not the absolute answer to what they had chosen for the login to their site to be..

Today I went through the logs to see if there are many beginner webbos out there nowadays and I see someone has an escape function to hide the login script, but of course in a few seconds you can find an unescape tool to crack the encoding… piece of cake.. and only slightly more than totally unsecure.

So please when making a site, do your authentication on the server.. this is 2011 afterall and you never know who is snooping.

I wonder why for almost a decade now with no effort on my part that http://www.netevolution.co.uk/scripts.asp?ID=25 comes up as a top 5 result in the SERPS for seemingly any permutation of “javascript checkbox validation”