Using Control Adapters

ASP.NET 2.0 introduced a new way of modifying how ASP.NET renders a control. For example, when you say: <asp:textbox id="FirstName" runat="server" /> You have very limited control over how the control actually renders. You can specify a cssclass to modify the look and feel, but the actual HTML rendering is limited to what’s available from the ASP.NET server attributes. For example you cannot add client-side onfocus or onblur statements. This is where Control Adapters comes in....

<span title='2007-05-15 04:55:43 +0000 UTC'>May 15, 2007</span>&nbsp;·&nbsp;2 min

Automatic Printing

Summary: Learn about automatic printing in a Windows platform using WScript. Automatic printing is a subject you will find a lot of content about on the internet – but most of it is useless. It’s a massive collection of try-this-try-that. I was searching for some descent content on how to do scheduled automatic printing but spent far more time that I would like to. Finally I arrive at this code:...

<span title='2005-09-20 23:42:20 +0000 UTC'>September 20, 2005</span>&nbsp;·&nbsp;1 min

Four Part Naming Convention in SQL Server

In SQL server if you want to reference a table using four-part naming convention and you receive the error message: Server ‘xxxx’ is not configured for DATA ACCESS. Then you need to execute this statement against the target server: EXEC sp_serveroption 'xxxx','DATA ACCESS',TRUE … that should fix the problem. An obvious point here is to replace xxxx with the target server.

<span title='2005-09-20 05:41:16 +0000 UTC'>September 20, 2005</span>&nbsp;·&nbsp;1 min


In Windows XP pressing CTRL+ALT+DEL twice in the login screen will take you to the classic login screen where you can manually type in the username and password to authenticate yourself. According to a Microsoft employee this feature maybe removed in future releases of Windows or worst yet it might be removed in future service packs. This would have caused serious problems for me because non-of the users I have on the intial list are administrators to the system....

<span title='2005-09-19 04:21:46 +0000 UTC'>September 19, 2005</span>&nbsp;·&nbsp;1 min

Using ASP.NET to authenticate against AD

The company I work for reliies heavily on active-directory to organize, authenticate and integrate. In order to login to the intranet from our site, we currently request the integrated windows authentication box and ask the user to login. For some people this was a little flattering because it didn’t really say why the login was taking place – where are they loging into and so on. So to remedy this issue, I am working on a ASP....

<span title='2005-09-18 02:58:44 +0000 UTC'>September 18, 2005</span>&nbsp;·&nbsp;1 min

Finding Content in your files

If you want to search text files in your computer for a specific string you can do this easily using the following code: for /f "tokens=*" %i IN ('dir /s /b *.asp') DO find /I "depthomepages" %i >> output.txt You can replace dir /s /b *.asp to something more appropriate. You can alternatively search only specific folders also, by simply modifying the dir arguments.

<span title='2005-09-17 00:57:23 +0000 UTC'>September 17, 2005</span>&nbsp;·&nbsp;1 min

Recursion in SQL

Oracle database supports a very strange construct called: start with, and connect by. For instance if you have a table which has two columns one that defines the parent of the other column such as: Parent Child 0 1 1 9 9 7 7 2 The parent of 2 is 7 and 7’s parent is nine and 9’s parent is one and so on until finally 1 who parent is 0 signifying no parent....

<span title='2005-09-11 15:21:31 +0000 UTC'>September 11, 2005</span>&nbsp;·&nbsp;1 min

Typed ToArray() from ArrayList

To get a typed Array of type int [] from an ArrayList you can do the following: (int [])TestArray.ToArray(typeof(int)); First the ToArray() function accepts a System.Type argument which is what it uses to convert the Array to type int. However, the return type of ToArray() is still object so we will need to cast that as well which can be done using the (int []).

<span title='2005-09-09 07:47:12 +0000 UTC'>September 9, 2005</span>&nbsp;·&nbsp;1 min

FTP & Microsoft ISA Server 2004

Microsoft ISA (Internet Security and Acceleration Server) 2004 is a tool to secure and accelerate (as the name suggests) networks running on Windows platforms. It’s a very powerful tool and is one of the most flexible firewalls I have seen in the market. Where I work, Microsoft ISA actually replaced several CISCO firewalls. Not only were we able to migrate all the access lists rules we were able to do far more than that....

<span title='2005-09-08 13:31:57 +0000 UTC'>September 8, 2005</span>&nbsp;·&nbsp;2 min

Recursive Fun (C#)

Recursive functions can be a lot of fun! I was playing around with a collegue of mine at work about solving recursive problems. And we both worked on a problem of deciding weather a number is the median in a list of numbers. Here’s my solution: using System; public class MedianRecursive { private delegate bool Function(int A, int B); private static bool GreaterThan(int A, int B) { return A>B; } private static bool LessThan(int A, int B) { return A<b; } private static string Partition(int[] List, int M, int Position, Function Compare) { if(Position>=List....

<span title='2005-07-14 02:17:47 +0000 UTC'>July 14, 2005</span>&nbsp;·&nbsp;2 min