Store an IP Address in a human-readable Int64 (bigint)

Lets say you have an  ip address in a string such as  “127.1.2.3” This code will store the information in an int64 (C#) or bigint (SQL) in with three places per octet. 127001002003 The highest this number could go is 255,255,255,255.00 which is too large for a 32 bit integer. Hence the Int64. In SQL an 64 bit Integer is big int so that is what you’ll need to store in an MS-SQL Database. I...

September 29th, 2009 by B.Harding 

Watch out Chuck Norris! Scott Guthrie is in town!

Boosted from http://developerdeveloperdeveloper.com/guathon/Default.aspx Some things you might not know about Scott Guthrie When Scott Guthrie throws exceptions, it’s across the room. All arrays Scott Guthrie declares are of infinite size, because Scott Guthrie knows no bounds. Scott Guthrie doesn’t have disk latency because the hard drive knows to hurry up. Scott Guthrie writes code that optimizes...

September 24th, 2009 by B.Harding 

Using gridview controls as an asyncPostBackTrigger

Adding an async postback trigger in an aspx page requires you to specify the control ID.  The problem is that the control ID is generated dynamically for items in a gridview row. Not to worry you can still use them. Open the control’s onLoad event and add it there using the control’s Unique ID as the AsyncPostpacktrigger’s ControlID. Done! The unique ID is the instance’s ID...

September 21st, 2009 by B.Harding 

My job hunt brain-dump

A couple of weeks ago I began working as a Web Developer for the American Motorcyclist Association. To me this is a big deal because I have the actual title of “Web Developer”. I love it. It’s a dream job. Nice people, nice gear, nice facilities and they have an adequate budget, I get benefits and paid over time. WooHoo! Getting here has been a bit of a journey. I’ve just come...

September 7th, 2009 by B.Harding