Monthly Archives: April 2011

How to prevent a textbox causing a postback

This is a rather annoying situation with a simple solution. Your page contains a textbox and if you press the enter key while the textbox has focus, it will trigger a POST request to the server. Unfortunately for the user, … Continue reading

Posted in Javascript | Leave a comment

Partial page updates with jQuery AJAX

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in AJAX, ASP.NET Web Forms, CSS, Javascript, jQuery | Leave a comment

Page Method via jQuery AJAX

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in AJAX, ASP.NET Web Forms, Javascript, jQuery | Leave a comment

ASP.NET ViewState

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in ASP.NET Web Forms, Javascript | Leave a comment

A generic XML string serialiser

The following class is a simple XML string serialiser which will work with most .NET objects except WCF data contracts which require the NetDataContractSerializer. The static methods Serialise and Deserialise convert an object instance to an XML string and vice … Continue reading

Posted in C#, NUnit, TDD | Leave a comment

Alternative to WITH (NOLOCK) in your SQL

Querying a table with the table hint NOLOCK allows a ‘dirty’ read to take place without applying a lock on the table. The advantages of this are performance over reliability because there may be uncommitted transactions or updates in progress, … Continue reading

Posted in SQL | Leave a comment