All-In-One ASP.NET Code Samples

All-In-One ASP.NET Code Samples

 

Introduction

The All-In-One ASP.NET code samples demonstrate the typical programming topics about ASP.NET. These topics are either frequently asked in MSDN forums and Microsoft Support, or are requested by many developers via our code sample request function. We want to alleviate the frustration felt by developers when they are developing ASP.NET projects.

 

Visual Studio 2008 Code Samples

Sample Description Download ReadMe
CSASPNETAjaxExtender The CSASPNETAjaxExtender sample demonstrates how to create an ASP.Net Ajax ExtenderControl, which is a TimePicker to allow the user draging the minute/hour pointer to select a time of a day on a clock. Download ReadMe.txt
CSASPNETAjaxScriptControl The CSASPNETAjaxScriptControl sample demonstrates how to create an ASP.NET AJAX ScriptControl, which is a scheduler to allow the user arrange tasks in calendar. Download ReadMe.txt
CSASPNETCacheAPI This ASP.NET sample demonstrates the usage of Cache API. Download ReadMe.txt
CSASPNETCascadingDropDownList The example demonstrates how to create Cascading DropDownList in ASP.NET Download ReadMe.txt
CSASPNETCustomDataSourceForRDLC This ASP.NET sample demonstrates how to use custom class as the datasource for the RDLC Download ReadMe.txt
CSASPNETCustomHttpHandlerandModule This sample introduces how to write custom Http Handler and Http Module and use them in ASP.NET web application on IIS. Download ReadMe.txt
CSASPNETDataListImageGallery The ASP.NET code sample demonstrates how to implement an image gallery with the DataList control Download ReadMe.txt
CSASPNETDataPager The CSASPNETDataPager sample describes how to use ASP.NET DataPager to render a paging interface and communicate with the corresponding data-bound control. Download ReadMe.txt
CSASPNETExcelImportExport The code sample demonstrates importing and exporting Excel worksheet in ASP.NET Download ReadMe.txt
CSASPNETFormViewUpload This sample demonstrates how to display and upload images in an ASP.NET FormView control and how to implement Insert, Edit, Update, Delete and Paging functions in the control. Download ReadMe.txt
CSASPNETGridView This CSASPNETGridView project describes how to populate ASP.NET GridView control and how to implement Insert, Edit, Update, Delete, Paging and Sorting functions in ASP.NET GridView control. Download ReadMe.txt
CSASPNETImageMap The project illustrates how to use the ASP.NET ImageMap control to create an introduction of the planets in Solar System via C# language. Download ReadMe.txt
CSASPNETMenu The sample demonstrates how to bind the ASP.NET Menu Control to the Database. Download ReadMe.txt
CSASPNETMVCCustomActionFilter This sample demonstrates how to use C# codes to create custom ActionFilters for ASP.NET MVC web application Download ReadMe.txt
CSASPNETMVCDataView The project illustrates how to use DataViews in MVC to handle the data proccessing work. Download ReadMe.txt
CSASPNETMVCFileDownload The project illustrates how to perform file downloading in an ASP.NET MVC web application. Download ReadMe.txt
CSASPNETMVCPager The ASP.NET MVC project illustrates how to customize an html extension method for paging. Download ReadMe.txt
CSASPNETOutputCache This VC# sample demonstrates the usage of OutputCache in ASP.NET Download ReadMe.txt
CSASPNETPageValidation The sample demonstrates how to use ASP.NET validation controls to validate user inputs Download ReadMe.txt
CSASPNETRDLCMainSubReport This ASP.NET sample demonstrates how to build a detail-report which get data from SQL Server based on a primary key passed from the master-report, then use the ReportViewer control to show that master/detail report in the web page. Download ReadMe.txt
CSASPNETReportViewerExport This ASP.NET sample demonstrates how to export the rdlc as PDF and EXCEL programmatically. Download ReadMe.txt
CSASPNETRssFeeds The project demonstrates how to create a rss feed using ASP.NET Download ReadMe.txt
CSASPNETUserControlEventExpose The ASP.NET code sample demonstrates "event bubbling" that allows a child control to propagate events up its containment hierarchy Download ReadMe.txt
VBASPNETAjaxExtender This sample demonstrates how to create an ASP.Net Ajax ExtenderControl, which is a TimePicker to allow the user draging the minute/hour pointer to select a time of a day on a clock. Download ReadMe.txt
VBASPNETFileUpload The project illustrates how to upload files in an ASP.NET project by use of FileUpload control and VB.NET language Download ReadMe.txt
VBASPNETFormViewUpload This sample demonstrates how to display and upload images in an ASP.NET FormView control and how to implement Insert, Edit, Update, Delete and Paging functions in the control. Download ReadMe.txt
VBASPNETImageMap The project illustrates how to use the ASP.NET ImageMap control to create an introduction of the planets in Solar System via VB.NET language. Download ReadMe.txt
VBASPNETLocalization The project illustrates how to build a multi-lingual website with ASP.NET Localization. Download ReadMe.txt
VBASPNETMasterPage The project illustrates how to use Master Page in ASP.NET Download ReadMe.txt
VBASPNETMenu The sample demonstrates how to bind the ASP.NET Menu Control to the Database. Download ReadMe.txt
VBASPNETRadioButtonTreeView This ASP.NET code sample shows how to simulate a RadioButton Group within the TreeView control to make the user can only select one item from a node tree Download ReadMe.txt
VBASPNETRssFeeds The project demonstrates how to create a rss feed using ASP.NET Download ReadMe.txt
VBASPNETUserControlEventExpose The ASP.NET code sample demonstrates "event bubbling" that allows a child control to propagate events up its containment hierarchy Download ReadMe.txt

Visual Studio 2010 Code Samples

Sample Description Download ReadMe
CSASPNETAddControlDynamically The VC# code sample demonstrates adding controls dynamically in an ASP.NET page Download ReadMe.txt
CSASPNETAJAXAutoComplete This ASP.NET code sample illustrates how to use the AJAX AutoCompleteExtender control to display words that begin with the prefix that is entered into a textbox Download ReadMe.txt
CSASPNETAJAXConsumeExternalWebService The ASP.NET code sample illustrates how to invoke an external Web Service from a different domain. Download ReadMe.txt
CSASPNETAJAXHTMLEditorExtender The ASP.NET AJAX code sample demonstrates the use of HTMLEditor - an HTML editor control provided by AJAX Control Toolkit, and how to extend the toolbar of HTMLEditor Download ReadMe.txt
CSASPNETAJAXImagePreviewExtender The VC# code sample illustrates how to design an ASP.NET AJAX Control Extender. In the sample, you will find a sample extender for previewing images. Download ReadMe.txt
CSASPNETAJAXWebChat The project illustrates how to design a simple AJAX web chat application. Download ReadMe.txt
CSASPNETBackgroundWorker The project illustrates how to use background worker thread in ASP.NET Download ReadMe.txt
CSASPNETBingMaps This project illustrates how to embed Bing Maps in an ASP.NET page as well as how to display the map according to several options and how to find a location via an input. Download ReadMe.txt
CSASPNETBreadcrumbWithQueryString In ASP.NET, sometimes we want to change the title and path of SiteMapPath control according to the Query String values. Sometimes we want to create the SiteMapPath dynamically. This code sample shows how to achieve these goals by handling the SiteMap.Site Download ReadMe.txt
CSASPNETChart This ASP.NET code sample illustrates how to use the new Chart control to create a chart in the web page Download ReadMe.txt
CSASPNETCurrentOnlineUserList This ASP.NET code sample shows how to display a list of current online users' information without using membership provider. Download ReadMe.txt
CSASPNETEmailAddressValidator The ASP.NET sample illustrates how to validate user's email address in the user registration form Download ReadMe.txt
CSASPNETEncryptAndDecryptConfiguration This sample shows how to use RSA encryption API to encrypt and decrypt configuration section in order to protect the sensitive information from interception or hijack in ASP.NET web application. Download ReadMe.txt
CSASPNETFileUploadStatus The ASP.NET code sample illustrates how to show the file upload status based on AJAX without using any third-part component Download ReadMe.txt
CSASPNETHighlightCodeInPage The code sample demonstrates highlighting syntax of source code inputted by user in a webpage Download ReadMe.txt
CSASPNETImageEditUpload The ASP.NET code sample illustrates how to upload, read, display, update and delete images stored in a database. Download ReadMe.txt
CSASPNETInheritingFromTreeNode The VC# code sample demonstrates extending the ASP.NET TreeView control to support tags Download ReadMe.txt
CSASPNETIPtoLocation The VC# code sample illustrates how to get the visitor's IP address and get the visitor's geographical location from the IP address in ASP.NET Download ReadMe.txt
CSASPNETPreventMultipleWindows The project illustrates how to detect and prevent from opening link in a new IE tab or window in an ASP.NET web page Download ReadMe.txt
CSASPNETRemoteUploadAndDownload The CSASPNETRemoteUploadAndDownload sample shows how to upload files to and download files from remote server in an ASP.NET application. Download ReadMe.txt
CSASPNETSerializeJsonString The ASP.NET code sample uses the JSON serializer component in the .NET System.Web.Script.Serialization namespace to perform .NET - JSON data convertion, and implements an auto-completion textbox. Download ReadMe.txt
CSASPNETShareSessionBetweenSubDomains This sample demonstrates how to configure a SessionState Server and then create a SharedSessionModule module to achieve sharing Session between sub domain ASP.NET Web Applications Download ReadMe.txt
CSASPNETTheme The project illustrates how to apply theme in ASP.NET web applications Download ReadMe.txt
JSVirtualKeyboard This project illustrates how to use Javascript to create a virtual keyboard on the web page. Download ReadMe.txt
VBASPNETAddControlDynamically The VB code sample demonstrates adding controls dynamically in an ASP.NET page Download ReadMe.txt
VBASPNETAJAXConsumeExternalWebService The ASP.NET code sample illustrates how to consume an external Web Service from a different domain. Download ReadMe.txt
VBASPNETAJAXHTMLEditorExtender The ASP.NET AJAX code sample demonstrates the use of HTMLEditor - an HTML editor control provided by AJAX Control Toolkit, and how to extend the toolbar of HTMLEditor Download ReadMe.txt
VBASPNETAJAXImagePreviewExtender The VB code sample illustrates how to design an ASP.NET AJAX Control Extender. In the sample, you will find a sample extender for previewing images. Download ReadMe.txt
VBASPNETAJAXWebChat The project illustrates how to design a simple AJAX web chat application Download ReadMe.txt
VBASPNETBackgroundWorker The project illustrates how to use background worker thread in ASP.NET Download ReadMe.txt
VBASPNETBingMaps This project illustrates how to embed Bing Maps in an ASP.NET page as well as how to display the map according to several options and how to find a location via an input. Download ReadMe.txt
VBASPNETBreadcrumbWithQueryString In ASP.NET, sometimes we want to change the title and path of SiteMapPath control according to the Query String values. Sometimes we want to create the SiteMapPath dynamically. This code sample shows how to achieve these goals by handling the SiteMap.Site Download ReadMe.txt
VBASPNETChart This ASP.NET code sample illustrates how to use the new Chart control to create a chart in the web page Download ReadMe.txt
VBASPNETCurrentOnlineUserList This project shows how to display a list of current online users' information without using membership provider. Download ReadMe.txt
VBASPNETEmailAddressValidator The ASP.NET sample illustrates how to validate user's email address in the user registration form Download ReadMe.txt
VBASPNETEncryptAndDecryptConfiguration This sample shows how to use RSA encryption API to encrypt and decrypt configuration section in order to protect the sensitive information from interception or hijack in ASP.NET web application. Download ReadMe.txt
VBASPNETFileUploadStatus The ASP.NET code sample illustrates how to show the file upload status based on AJAX without using any third-part component Download ReadMe.txt
VBASPNETHighlightCodeInPage The code sample demonstrates highlighting syntax of source code inputted by user in a webpage Download ReadMe.txt
VBASPNETImageEditUpload The ASP.NET code sample illustrates how to upload, read, display, update and delete images stored in a database. Download ReadMe.txt
VBASPNETInheritingFromTreeNode The VB code sample demonstrates extending the ASP.NET TreeView control to support tags Download ReadMe.txt
VBASPNETIPtoLocation The VB code sample illustrates how to get the visitor's IP address and get the visitor's geographical location from the IP address in ASP.NET Download ReadMe.txt
VBASPNETRemoteUploadAndDownload The VBASPNETRemoteUploadAndDownload sample shows how to upload files to and download files from remote server in an ASP.NET application. Download ReadMe.txt
VBASPNETSearchEngine The code sample shows how to implement a simple search engine in an ASP.NET web site. Download ReadMe.txt
VBASPNETSerializeJsonString The ASP.NET code sample uses the JSON serializer component in the .NET System.Web.Script.Serialization namespace to perform .NET - JSON data convertion, and implements an auto-completion textbox. Download ReadMe.txt
VBASPNETShareSessionBetweenSubDomains This sample demonstrates how to configure a SessionState Server and then create a SharedSessionModule module to achieve sharing Session between sub domain ASP.NET Web Applications Download ReadMe.txt

Download all code samples: https://1code.codeplex.com/releases

Submit your request of ASP.NET code samples (Guidance)