Hot Topics

DateTime.ToString() Patterns

DateTime.ToString() Patterns All the patterns: 0 MM/dd/yyyy 08/22/2006 1 dddd, dd MMMM yyyy Tuesday, 22 August 2006 2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30 3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM 4 ddd

Paul Hayman - 1,300,818 views

Select a row in an asp:GridView without using a Select Command

Select a row in an asp:GridView without using a Select Command ASP.Net's GridViews can be quite useful, but beware of binding them to huge datasets as this has an overhead on the ViewState. Often you'll want to display a number of columns on each line and row space becomes an issue. W

Paul Marshall - 469,424 views

Increase your Virtual machine's disk size

Increase your Virtual machine's disk capacity Background The geekzilla team have been using VMWare for over a year now for desktop virtualisation . There are loads of benefits of virtualisation , but the most obvious one for me is increased stability. For years I had a single

Paul Marshall - 246,613 views

Create your own torrent download server using uTorrent - Part1

Create your own torrent download server - Part 1 Background Thursday 26th Novemember saw my media server (an old desktop running XP SP2) give up on me. The harddisk that the OS was installed on was corrupt with a boot becoming impossible because some of window's key files like HAL.d

Paul Marshall - 177,323 views

Calling a static "page method" from Javascript using MS AJAX

Calling a static "page method" from Javascript using MS AJAX Atlas gave us the ability to easily call Web Services from JavaScript. MS AJAX has gone one step further! We can now call methods in the codebehine of the current page from Javascript. Here's how: This is designed for v1.0.61

Paul Hayman - 165,026 views

Select Column Information using SQL Server

Select Column Information using SQL Server Use this T-SQL to select infomation about a specific table/columns, Useful for automated scripts. DECLARE @tablename varchar(100) SET @tablename = N'myTable' SELECT clmns.name&n

Dave Howard - 152,385 views

URL Regular Expression

URL Regular Expression string pattern = @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)"  

Paul Hayman - 148,871 views

"This row already belongs to another table" Error

"This row already belongs to another table" Error What an annoying error!! I couldn't believe that I couldn't just add a Row from one DataTable to another, while looping around a DataTable's Rows. It turned out to be slightly more complicated than the code I had written, I've si

Paul Marshall - 136,698 views

Launching an Ajax ModalPopupExtender from JavaScript

Launching an Ajax ModalPopupExtender from JavaScript This is an updated version of the earlier (and very popular) Atlas article It is by far the simplest way to launch an Ajax ModalPopupExtender from javascript. The groundworks Add a hidden link for ModalPopup Extender to attach

Paul Hayman - 85,574 views

Authenticated HTTPRequests (Using Credentials)

Authenticated HTTPRequests (Using Credentials) Recently I had to make a SOAP call to a Cisco CallManager (an IP PBX). This required that the request used basic authentication. I couldn't add a web reference as the cisco interface doesn't support GET requests, so the Visual Studio discovery

Dave Howard - 81,183 views

IsGuid() (Regular Expression Guid Match)

IsGuid() (Regular Expression Guid Match) A regular expression for validating a string as being a Guid is.. @"^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$" Example usage Below is a function I try to keep handy which t

Paul Hayman - 80,412 views

Backup ALL your SQL Server 2005 databases using ONE script

Backup ALL your SQL Server 2005 databases using ONE script I wanted to backup all my databases... I had loads, creating a step for each db was getting tedious, so I wrote this script. Enjoy DEC

Paul Hayman - 80,095 views

IP Address regular expression

IP Address regular expression string pattern = @"\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"  

Paul Hayman - 78,760 views

Create your own torrent download server - Part 2

Create your own torrent download server - Part 2 Creating a torrent server - Part 1 Okay, if you've got uTorrent running and accessible via a browser (locally and remotely) we're ready to install it as a Windows Service. Install uTorrent as a Windows Service We need a co

Paul Marshall - 76,946 views

Creating a Tag Cloud in C#

Creating a Tag Cloud in C# I wanted to add a TagCloud to GeekZilla and another bespoke development project. The first thing I did was look around the web for some examples (or free components). To my supprise none jumped out at me. So, I decided to write my own. At first I found myself

Paul Hayman - 73,127 views

How To Create A Virtual Machine from a Physical Disk

How To Create A Virtual Machine from a Physical Disk We recently had a problem in converting a physical machine to a virtual machine. We have tools which work on the VMWare server products (ala Platespin) but we could not convert the ESXServer image back to a VMWare Workstation image. Despit

Mark Page - 69,918 views

Using Regular Expressions to validate a filename in a FileUpload control

Using Regular Expressions to validate a filename in a FileUpload control Here's a little code snippet I use to ensure that the file that has been uploaded is of type JPG, JPEG, PNG or GIF // check anything has been uploaded if (ThumbnailImageUpload.Poste

Paul Hayman - 68,056 views

Enabling Service Broker

Enabling Service Broker The following T-Sql enables or disabled service broker on SqlServer 2005. The Service Broker is required by .net for SqlCacheDependency support -- Enable Service Broker: ALTER DATABASE [Database Name] SET ENABLE_BROKER; -- Di

Paul Hayman - 63,734 views

Full Text Search in SQL 2005

Full Text Search in SQL 2005 Full Text Search was installed when SQL Server was installed and a service was running, so I expected it to just be sitting there waiting. This is unlike SQL 2000, where I lost count of how many times I had to install it on different servers. Was I wron

Ric Hayman MCPD - 60,041 views

Launching an Atlas ModalPopupExtender from JavaScript

Launching an Atlas ModalPopupExtender from JavaScript Looking for an Ajax version of this article?? Looking round the web there are some crazy ways people are trying to launch the ModalPopupExtender from JavaScript, the most common way being setting a timeout which calls the Click meth

Paul Hayman - 54,132 views

Adding a Strong Name to an existing DLL that you don't have the source to

Adding a Strong Name to an existing DLL that you don't have the source to There are times when you need a DLL to have a strong name; putting it in the GAC for example. With 3rd party DLL's this could be a pain. This is how you do it: From a VS.NET command prompt, enter the following:

Paul Hayman - 53,691 views

GRANT Permissions on all of your Stored Procedures using a query

GRANT Permissions on all of your Stored Procedures using a query Permissions are an essential security feature, and you'll often create Roles and Users when you copy your Database live. Rather than using the permissions dialog boxes in Enterprise Manager you can write some T-SQL to perform

Paul Marshall - 53,129 views

Google Applicance - googleoff / googleon Tags

Google Applicance - googleoff / googleon Tags I came across these recently... thought I'd share The googleoff/googleon tags disable the indexing of a part of a web page. The result is that those pages do not appear in search results when users search for the tagged word or phrase. For

Paul Hayman - 50,673 views

Custom Validators using Client Side JavaScript

Custom Validators using Client Side JavaScript In my latest project I am really enjoying using the Ajax Control Toolkit, particularly the ModalPopupExtender. I've been using the popup panels to capture data, but I needed to validate the data that a user enters into certain fields. ASP

Paul Marshall - 46,493 views

Clear your Visual Studio Recent projects list

Clear your Visual Studio Recent projects list If you do a lot of tinkering in VS2005 and you want to clear down your recent projects list, this can be easily achieved by some simple registry editing HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList You will f

Paul Marshall - 44,426 views

Dynamically adding a CSS link to the page in c#

Dynamically adding a CSS link to the page in c# The following code adds a CSS link to the header node of a Html page. // register css HtmlHead head = (HtmlHead)Page.Header; HtmlLink link = new HtmlLink(); link.Attributes.Add("href",

Paul Hayman - 40,512 views

Enabling TRUSTWORTHY on a SQL 2005 Database

Enabling TRUSTWORTHY on a SQL 2005 Database If your .NET stored procedure wants to have external access, the targer database will have to have TRUSTWORTHY set on.. this is how you do it. ALTER DATABASE databasename SET TRUSTWORTHY ON; GO

Paul Hayman - 39,271 views

Why we use C# for .NET development

Why we use C# for .NET development In the company where we work, we have a policy of using Java for all major developments. The core reason behind this being that we have a long term aspiration to being vendor and platform independent. Regards the .NET framework the policy is to

Dave Howard - 37,231 views

Returning a value from a PageMethod

Returning a value from a PageMethod using MS AJAX NOTE: This is designed for v1.0.61025.0 of AJAXExtensionsToolbox.dll If you've ever returned data from a web service using MS AJAX this technique will look familar. Call the method from javascript by append PageMethods. to the fro

Paul Hayman - 36,689 views

List all Tables SQL Server

List all Tables SQL Server Here's a tiny bit of SQL for listing all the Tables in a database: SELECT      * FROM      sys.tables

Paul Hayman - 36,458 views