Updated 101 VB and C# samples using Visual Studio 2005 Now Available


Link: 101 Samples


There’s a lot new in the .NET Framework 2.0 and one of the toughest things we had to do was decide which features to show off. Here’s 101 samples to get you started.  



Base Class Libraries



  • Changing ACL (Access Control Lists) on files

  • Console Enhancements including buffer control, simple animations and colors

  • Downloading files using FTP (File Transfer Protocol)

  • Network Programming including PING, UDP, and TCP network statistics

  • Using the new Stopwatch class to measure time

  • Compressing and decompressing files in the GZip format

  • Retrieving Drive Information

  • Using Generic Collections

  • Creating Regular Expressions to parse text 

  • Building a tracing infrastructure to track errors and application performance

  • Controlling cache policies with the new System.Net.Cache namespace

  • Creating a process viewer

  • Creating a Windows service manager

  • Using the data protection API

  • Encrypting and decrypting data

  • Using platform invoke to access legacy or unmanaged code from within managed code  

  • Building in support for localization

  • Using the NGEN utility

  • Using the new SecureString class

  • Using new socket class methods

  • Using serial ports with the new Port class

  • Working with the file system

  • Working with threads to manage multiple tasks simultaneously

  • Building a simple web server with HTTPListener 

Data Access Samples



  • Asynchronous Queries

  • Attaching a database with your application

  • Creating and using User Defined Types with SQL Server 2005

  • DataReader vs. DataSet comparision

  • DataSet and DataTable Enhancements

  • Performing Batch Updates and Data Paging

  • Performing Bulk Updates

  • Reading and Writing Images from a Database  

  • Using Factory Classes

  • Using Managed Stored Procedures and User Defined Functions with SQL Server 2005

  • Using Multiple Active Result Sets with SQL Server 2005

  • Using Notifications with SQL Server 2005

  • Using the XML data type with SQL Server 2005

  • XPath and XSLT Transformations Enhancements

Web Development Samples



  • Using SQLCacheDependency for caching

  • DataBinding using the ObjectDataSource, SqlDataSource, and XmlDataSource objects

  • Create a Master/Details view using the DataGridView and DetailsView controls

  • Basic Master Pages, Nested Master Pages, and Browser-specific Master Pages

  • Using the new membership controls including the LoginStatus, LoginName,

  • LoginView, CreateUserWizard controls 

  • Using the Menu and SiteMapPath controls

  • Using Profiles to store user properties

  • Using the Membership and Roles API for custom roles

  • Using the TreeView control dynamically and responding to TreeView events

  • Creating a custom portal 

Visual Studio Tools for Office



  • Creating custom menus in Outlook

  • Creating smart tags in documents

  • Creating custom toolbars

  • Data islands and caching

  • Integrating Windows forms into Outlook

  • Using bookmarks in Word

  • Using managed controls in Excel

  • Using VBA and VSTO together 

  • Working with charts in Excel

  • Working with contacts and tasks in Outlook

  • Working with InfoPath 2003

  • Working with named ranges in Excel

  • Working with the In Box

  • Working with XML in Excel

  • Working with XML in Word

  • Using the List object 

Tablet PC



  • Utilizing the back of pen erase feature

  • Creating a content enabled form

  • Working with drawing attributes

  • Enabling gestures 

  • An ink-enabled text box

  • Creating power aware applications

  • Simple text recognition

  • Speech recognition 

Compact Framework Samples



  • Creating a setup CAB

  • Creating a data-centric application

  • Creating a data-centric application (part 2)

  • Using the date/time picker feature in the month calendar

  • Document list

  • Embedded resources

  • Handling the screen orientation

  • Handling the hardware button screen orientation

  • Help and notifications

  • Registry sample

  • Creating a SQL CE result set

  • Using Microsoft Message Queue (MSMQ)

  • Web browser sample 


Comments (11)

  1. Mike A says:

    Have the database files been updated to be compatible with SQL Server 2005 RTM?

  2. Mike – the DB files have been upgraded to work with SS 2005 RTM – at least I know that most of them have been changed.

  3. Chuck Sterling beat you to it Frank…it should be Brad McCabe making the update….

  4. Steve Link says:

    I am interested in working with the serial port so I was glad to see a sample program for working with it.  I tried to run "UsingTheSerailPort" in debug mode under VB 2005 Express but I got the following errors as soon as the program started:

    A first chance exception of type ‘System.ArgumentOutOfRangeException’ occurred in System .dll

    A first chance exception of type ‘System.IO.IOException’ occurred in System.dll

    Any ideas on what to do or where to look for solutions to this?

  5. srini222 says:

    I’ve Visual Web Developer 2005 Express edition. SQL Server 2005 is also installed while doing Webdeveloper installation. Also had IIS. I’ve installed the 101 Samples all into my system. Samples are extracted to C:Documents and SettingsLogged UserMy DocumentsMSDNCS101SamplesAll.

    There are various subfolders classifying all samples.

    CS101SamplesAll has been made virtual directory.

    But I’m not able to test the samples.

    After opening the files I’m getting the following errors.

    When I try CTRL + F5

    C:Documents and SettingsLogged UserMy DocumentsMSDNCS101SamplesAllCS101SamplesWebDevelopmentMenuAndSiteMapPathStart.aspx: ASP.NET runtime error: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. (C:Documents and SettingsLogged UserMy DocumentsMSDNCS101SamplesAllcs101sampleswebdevelopmentmenuandsitemappathweb.config line 20) C:Documents and SettingsLogged UserMy DocumentsMSDNCS101SamplesAllCS101SamplesWebDevelopmentMenuAndSiteMapPathStart.aspx

  6. abdul wahab says:

    Error 1 It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. C:Documents and SettingsuserMy DocumentsVisual Studio 2008WebSitesking-asp2.0emailweb.config 58

    How could i get rid of this?please help me out from this hell

    mail meon:abdulwahab79@gmail.com