Sample Code
-
How to disable uppercase/capitals menus in Visual Studio 2012
by James Crowley
Simple registry fix to turn off the upper case menu bar in Visual Studio 2012
-
Binding Multiple Fields to ASP.NET ListControl classes
by Neil Dodson
Out of the box, the ASP.NET list controls (CheckBoxList, RadioButtonList, DropDownList) only support data binding on a single field. Learn how to work around this to bind to as many fields as you need.
-
Deep clone an object in .NET
by James Crowley
A simple code snippet that deep-copies an object by serializing and de-serializing using the BinaryFormatter
-
Making a .NET app run on Vista with Administrator priviledges
by James Crowley
If you're targeting Windows Vista and your application requires administrator priviledges (such as accessing the program files directory), then it will fail unless you include a manifest so Windows knows. Here's how.
-
Generate PDFs using C# and the free iTextSharp library
by James Crowley
Learn how to use the free iTextSharp library to load a PDF form, populate some dynamic fields, and then save out a flat PDF file.
-
Debugging client JavaScript in VS 2005
by Jimmy Skowronski
Short guide how to debug client JavaScript in VS 2005.
-
The AJAX "Top 5" security tips
by Moe Tarhini
There is no doubt that AJAX and AJAX-style technologies are the way forward for web design. Developers can create true "applications" on the web like never before - however care needs to be taken with AJAX, in order to keep web sites secure.
-
Calculate the difference between two dates, ignoring weekends
by joki
This code allows calculating with dates as if there were no weekends. To achieve this, days are numbered from Monday, 29 December 1969 without any intervening weekends (that is, five days per week). One purpose is to calculate the number of working days in a month, ignoring further public and bank holidays.
-
Interacting with TinyPic from C#
by Fernando Sanchez
The following tutorial will demonstrate how to interact with http://tinypic.com, an image mirroring service, directly from a C# application using the WebRobot component.
-
Create PDF Files on fly in C#
by Salman Zafar
This sample code shows how to use the iText library to generate PDF files on the fly. The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images.
-
Start a Process as a Different User
by Peter Rekdal Sunde
This tutorial will help you learn how to start a process as another user e.g. the Administrator account.
-
How to empty a recycle bin
by Peter Rekdal Sunde
Here is a little snippet that allows you to clean your recycle bin without any confirmation from the user, no progress ui and the sound is removed.
-
VB Express Color Object to Hex String
by Chris Buske
This function takes one color type variable and returns the hex code in a string.
-
Storing Documents with MS Access - SharePoint lists or Access BLOB fields
by Sean Brady
This is an Access 2003 project file that demonstrates how to do a few cool things with documents. You can grab the project file (zipped) from here: http://www.guardianbob.com/support/public_files/DocumentStorageTest.zip This project will show you how to store and retrieve documents from both an Access table with a BLOB field as well as a SharePoint list (via linked tables and the list web service).
-
Developing your first Visual WebGui application
by Guy Peled
An introduction to Visual WebGui through a sample application.
-
Visual WebGui a unique approach to AJAX development
by Guy Peled
Visual WebGui is not just another AJAX framework but rather a different approach to web application development, specially designed to simplify building highly complex applications like Outlook Web Access (OWA). Visual WebGui makes it possible for developers to create applications that were previously developed only by the "big guys".
-
Validate Phone or Fax Number
by Pradip Patel
This is a small javascript function that can be used to validate a phone or fax number.
-
Mouse Coordinates
by XNeo
This application is simple but sometimes useful, it gives you the cursor coordinates when you move it across the screen. You can use this to create a list of random numbers or maybe to trigger an event when the cursor moves over already determinded X and Y.
-
opening a .net page in a new window
by chezhian
This script shows how to open a new page inside a new window rather than the existing window. You can also remove all the buttons and toolbars that exist in the standard browser window so that the entire new window is filled with only your content. You could either open an existing page or you could create dynamic content inside the new window.
-
Health Monitoring in ASP.NET 2
by
This is a code sample for using health monitoring...