Sample Code
-
Create Table in a Database
by amoibade
This code shows you how to create a table and it's indexes in a database at run time.
-
Url Rewriting with Regex for ASP.NET 2.0
by Xavier Larrea
A new feature in ASP.NET 2.0 is it's built-in url rewriting support. When i looked into this new feature I found that it lacked regular expressions support, which is really the point of an Url Mapper. So, this code demonstrates how to create a Url Rewriting Module with Regex support in ASP.NET.
-
Login Form
by Safreak
This code allows a user to login to another form if that user has a profile within a database. Since many newbies are often looking for login code, hopefully this simple Access example will be helpful.
-
Executing a .CS file
by David Cumps
Demonstrates how to write a C# program that can "launch" a .cs file and execute it.
-
How to get an array of all files in a directory
by Edward Tanguay
This simple code will give you an array containing all files in a directory.
-
A Calendar Class for Classic ASP
by Macky M
Provides source code for a calendar to embed in your ASP applications
-
How to disable all elements on a form
by Edward Tanguay
You almost always want to have your form to be disabled as soon as the user pressed the submit button so that the user doesn't accidently submit the form twice. Here's how.
-
Display UserControl properties in the Property Window
by ElementK Journals
How to display UserControl property settings in the Property Window
-
How to disable Ctrl+Alt+Del
by Abdul
This simple code shows you how to disable/enable the Ctrl+Alt+Del keys
-
Drag and Drop ListBox items
by James Crowley
How to enable the user to drag and drop items between list boxes
-
Converting RGB to HEX colour codes
by Ruan Meyer
This is a simple color converter, Using a textbox control to display the color, three text boxes for Red, Green and Blue values, also 3 sliders if the exact rgb color is not known
-
Declare public constants in a class module
by James Crowley
How to declare Public numeric constants in a Visual Basic class module
-
Create a Hot Key
by Georgi Ganchev
How to create a Hot Key for your application
-
Load/Save listboxes to a file
by Mike J
A neat bit of code to load a file into a listbox, and then save it again.
-
Count the number of records
by James Crowley
How to count the number of records in the Data Control
-
Uploading Files Using ASP.NET
by Man from Mars
No need of third party components to upload your files. It is so easy to upload files in ASP.NET using just 3 lines of code.
-
Listview SubItem Click Detection
by Kym Manson
How to detect when a Listview's subitem has been clicked.
-
Passing variable values to a form
by ElementK Journals
An Object Orientated way to pass Visual Basic variable values to a form
-
IE Browser Helper Objects
by Steven Cohn
A demonstration of how to implement an IE Browser Helper Object in C#
-
String Concatenation
by James Crowley
How to join/append two strings together in VB