ASP.NET Sample Code
-
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.
-
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.
-
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".
-
Health Monitoring in ASP.NET 2
by
This is a code sample for using health monitoring...
-
Sending Authenticated Emails in .NET 2.0
by Xavier Larrea
Learn what's changed with .NET 2.0 and how to send out emails using an SMTP server that requires authentication.
-
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.
-
Building an 'AJAX' ProgressBar in Atlas
by Wilco Bauwer
Learn how to write a basic, client-side Atlas progress bar, and download the source code.
-
Precise .NET Server Content Caching
by Dimitrios Markatos
A simple demonstration of how to programatically use the caching facilities that ASP.NET offers.
-
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.
-
Transactions made easy with .NET 2.0
by Xavier Larrea
One of the more significant improvement in .NET 2.0 is the transactions area. Now with a single line it becomes extremely easy to support transactional code blocks using the concept of “ambient” transaction thanks to TransactionScope in the System.Transactions namespace.
-
Encrypting Web.config sections in ASP.NET 2.0
by Xavier Larrea
Learn how to encrypt any section of your Web.config file on-the-fly and programatically; plain-text connection strings in your config file are no more!
-
Applying XSL transformations to XML in .NET
by Krishnan
A simple demonstration of how to apply an XSL transformation to an XML file and save the output using .NET
-
Using ASHX files to retrieve DB images
by Harry Pierson
Learn how to use the little-known Http Handler functionality of ASP.NET to serve images from a database.
-
Dynamically loading an IBindableTemplate
by James Crowley
Demonstrates how to dynamically load an IBindableTemplate from a file for use with new ASP.NET 2.0 controls such as the FormView, to workaround the lack of a LoadBindableTemplate method in the new version of the framework.
-
Binding a Control to an Enum
by James Crowley
Ever had an Enum (with a set of names and values) that you wanted to bind to a control like a DropDownList? Here's how.
-
A Simple ASP.NET MessageBox Class
by Lee Gunn - .NET C# Scotland
When moving from Windows Forms to ASP.NET Web Forms, an API that may be missed is that offered by the System.Windows.Forms.MessageBox Class. Here we implement it for ASP.NET!
-
Dynamic thumbnail images from ASP.NET
by Brock Allen
This sample code is an IHttpHandler implementation that reads a JPG from the filesystem and dynamically generates a thumbnail sized version of the image and emits that to the response stream. What I like about this approach is that you don't need to create a file on the filesystem for the thumbnail as it's all done in memory.
-
Cross page postbacks in ASP.NET 2.0
by Brock Allen
ASP.NET 2.0 introduces the ability to have an ASPX page postback to a different ASPX page with cross page postbacks. This was done all the time in ASP but wasn’t supported in ASP.NET 1.x. Here we show you how to use this new feature.
-
Programatically Load User Controls
by Dave Wanta
How to programatically load user-controls from code behind pages and then access their properties using reflection.