Subscribe to
Posts
Comments

Archive for the '.NET' Category

Everybody is talking about AJAX nowadays since Google Maps and Google Suggest showed the world how cool it can be. We used this technology at a previous employer 3 years ago for displaying live gambling odds… but anyway I thought i’d take a look at what libraries are out there for doing this in .NET.
Top [...]

Having spent a couple of days trying to load a 30.5Gb Xml file, i’ve discovered that there is a problem in the XmlTextReader class in that is uses an integer to track the file position. Now, I guess that having massive Xml files isn’t really what they were intended for, but that’s why i’m using [...]

I’ve been working on a 30gb Xml file today, importing it into one of our systems. There are always problems working with files this big - how do you get just a small segment to test on? how can you view small regions of it, or search it?
Most tools available for Windows aren’t up to [...]

You will need…
NUnit
This lets you write test scripts / methods etc for your code. There is a tutorial on how to use it (word doc) on their website, and if you’d like to go a step further and use NCover with it, check out my previous blog article. (NCover will monitor your testing and tell [...]

I’ve just been reading up on mocks for testing and they look like a pretty neat and powerful way to improve your testing. I’ve written this sample code based on the example Martin Fowler gives in his excellent article.
This example is of an order which attempts to fullfil itself from a Warehouse. Here’s the Warehouse [...]

Normally if you were trying to sort a DataTable you would do see something like
[csharp]
DataTable table = retrieveTable();
DataView view = new DataView(table);
view.Sort = “Name”;
datagrid1.DataSource = view;
datagrid1.DataBind();
[/csharp]
Doing this works fine for UI cases, but if you need to get access to the sorted table you’ll want to do this.
[csharp]
DataTable unsortedTable = retrieveTable();
DataTable sortedTable = new DataTable();
foreach [...]

Taken from this blog is a technique which will postback the form when you hit enter. If you use the script below, it will work in any browser (although bypassing any onClick code for the button specified).
[javascript]
function clickButton(e, buttonid)
{
var bt = document.getElementById(buttonid);
if (typeof bt == ‘object’)
{
try
{
if(navigator.appName.indexOf(”Netscape”)>(-1))
{
if (e.keyCode == 13)
{
bt.click();
return false;
}
}
if (navigator.appName.indexOf(”Microsoft Internet Explorer”)>(-1))
{
if (event.keyCode == [...]

Useful collection of string formats for .NET
String formatting in C#

ASP.NET by default sniffs Firefox and incorrectly identifies it as being a down-level browser. This has the effect of emitting ’simple’ HTML without various CSS attributes. To fix it, view this blog and update your web.config (or machine.config if you have access).

The Code Project - The 30 Minute Regex Tutorial - .NET

« Prev - Next »