101 examples, demo code written in Visual Basic and C#, contain demonstrations of many new features of Visual Studio 2005 and .NET Framework 2.0. For more code examples, see this download .
Download all 101 examples: C# version | VB version
These examples were developed and tested using Visual Studio 2005
data access
This data access code example demonstrates how to use classes in System.Data and related namespaces, and how to use new features in SQL Server 2005. Code examples include:
- Asynchronous queries
- Attaching databases to applications
- Creating and using User Defined Types in SQL Server 2005
- Comparison of DataReader and DataSet
- DataSet and DataTable enhancements
- Performing Batch Updates and Data Paging )
- Perform bulk updates (Bulk Updates)
- , read and write images in the database,
- use the Factory class,
- use the Managed Stored Procedure in SQL Server 2005, and user-defined functions (User Defined Function),
- use the SQL Server 2005 Multiple Active Result Sets
- using Notifications in SQL Server 2005
using XML data types - XPath and XSLT transformation enhancements
- in SQL Server 2005
Download: C# version | VB version
Web development
This web development code sample demonstrates how to use some of the new features in ASP.NET 2.0. Code examples include:
- Using SQLCacheDependency for buffering
- Using ObjectDataSource, SqlDataSource, and XmlDataSource for data binding
- Using the DataGridView and DetailsView controls to create a Master/Detail view-
- based Master Page, nested Master Pages, and browser-customized Master Pages
- using the new Membership controls, including LoginStatus, LoginName, LoginView, CreateUserWizard and other controls.
- Use menus and SiteMapPath controls.
- Use Profiles to store user attributes.
- Use Membership and Roles APIs to customize roles.
- Dynamically use TreeView controls and respond to TreeView events.
- Use Web Parts to create a customized portal.
Download: C# version | VB version
Windows Forms
This Windows Forms code sample demonstrates how to use some of the new features in Visual Studio 2005 to create a desktop application. Code examples include:
- Run an asynchronous task (Asynchronous Task)
- Store customized client configuration information
- Create Master/Detail form
- playback, loop playback and asynchronous playback of sounds
- Use BindingNavigator to manipulate static and dynamic data
- Use BindingSource to store static and dynamic data objects
- Extend ClickOnce , programmatically implement the application
- to update the control type of the column of the custom DataGridView.
- Use LayoutPanel,
- use the MaskedTextBox control to enter data of built-in types and custom types.
- Use the Menu, StatusStrip and ToolStrip controls to control a simple rich text box.
- Use My to access the application, computer , configuration and other information. Note: This example is for Visual Basic.
- Use the SplitContainer control
- as the basis of the WebBrowser control and use the WebBrowserControl and HTMLDocumentModel controls to achieve two-way communication from the form to the browser.