SiteCrafting Blah Blah Blog
Mar. 31, 2008 at 11:40am
Got API?
An API reference does a method's body good...

gotAPI.com is one of the most useful online resources I've come across, primarily because it places resources spread all over the internet into one simple site. I've been using this for quite some time, and have for the most part I have taken its usefulness for granted. Then it occurred to me that I might not be the only one that could find this tool useful (I know, it was a big 'DUH!' moment). So now I will share this gem with others...
Read more
Comments (1) | Posted in ASP.NET 2.0, CSS, From the Workbench, Javascript, MS SQL Server, MySQL, PHP, Review, Software Engineering, XHTML by Nick Williams
Aug. 9, 2007 at 4:14pm
Getting the Client’s IP Address
There are a number of reasons why you may want to capture a web user's IP address. You may want to only allow certain IP addresses to view your website, to allow only one vote per IP address, track unique clicks on links and buttons, a location of web users on Google Maps using MASHUP, and whatever else you can think of.
Below are a couple of examples to get the client's IP address in PHP and ASP.net, along with a couple of things to watch for.
Read moreComments (0) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench, PHP by Ken Foubert
Jul. 23, 2007 at 5:29pm
ASP.net 2.0 Gridview vs. Custom Coding
A balance of needs and time
I recently decided to try the Gridview control in asp.net 2.0. I read some documentation and decided that it would be very easy to implement. I started by following a step-by-step tutorial on creating a table using the Gridview control, which uses the SqlDataSource control. This step-by-step tutorial included details on how to add paging, column sorting, updating a record, and deleting a record. The tutorial can be found here.
I was actually excited when I got this to work and how easy it was to do. It would only take a few minutes to create a simple, paged, sortable table where a user can delete and update records right on the page. Please note that simple is the operative word here.
Read more
Comments (2) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench by Ken Foubert
Jun. 4, 2007 at 11:31am
ASP.NET 2.0 Tips - Shared Functions
Visual Basic for ASP.NET 2.0
When developing a recent project for ASP.NET, there was a need to migrate a large number of generic functions that were created in PHP into the .net web project. For .net 1.0, you were able to add a code page that could be used for creating a bunch of functions. However, in .net 2.0, you still had the ability to add a code page, but it had to be a class. This meant placing all of our migrated functions as methods inside a class. To use a generic function, such as generateNewPassword(), you would have to first create a new object for the class and then call the method. Read more
Comments (0) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench by Ken Foubert
Nov. 3, 2006 at 10:51am
How To Full-Text Search
Inspired by Joe's MySQL Cross Table Content Search
Here's a quick how-to on implementing Full-Text Searching using Microsoft SQL Server 2005. Originally, I planned on just using LIKE statements in the WHERE clause of an sql query, however, this would not be possible since, as I posted earlier in MS SQL Server 2005 text and ntext, that string functions do not work on text and ntext data types.
That's when I remembered Joe's blog entry about Cross Table Content Search, which he also mentioned in the office a couple of times before his entry. After that, I've been wanting to implement the Cross Table Content Search, and did not get the opportunity until developing the search page for the Pierce County Library.
Read more
Comments (0) | Posted in ASP.NET 2.0, From the Workbench, MS SQL Server by Ken Foubert
Oct. 27, 2006 at 11:25am
MS SQL Server 2005 text and ntext
text, ntext, and image data types have been deprecated
How I discovered that text, ntext, and image data types have been deprecated and replaced by varchar(max), ntext(max), and varbinary(max).
Recently, I needed to perform a query to update a number of links for the Pierce Count Library website. I thought I could use a simple REPLACE() string function, unfortunately, this turned out not to be the case. In order to update text and ntext datatypes using a query you're limited to a few functions, in my case I would be forced to use SUBSTRING() or UPDATETEXT().
Read moreComments (1) | Posted in ASP.NET 2.0, Coding Techniques, From the Workbench, MS SQL Server by Ken Foubert