Persisting Page State in ASP.NET 2.0
There are different types of state in an ASP.NET web application: page state, session state, and application state.
Page state is state that is specific to a particular user's visit to a particular page and is commonly used to remember any
programmatically changed state of the page across postb......
A Look at ASP.NET 2.0's URL Mapping
URL mapping - a feature new to ASP.NET 2.0 - enables page
developers to map one set of URLs to another. If a request comes in for one of the URLs in the first set, it is automatically
re-mapped on the server-side. For example, you can configure the application so that the URL ~/Beverages.aspx
is......
Creating a Quick and Dirty Online Blackjack Game
Every now and then I like to give myself a fun little programming challenge. I'll randomly pick some enjoyable task, like
programming a game or blogging engine or what not, and impose a time limit, anywhere from an hour to an afternoon.
Such little challenges keep the fun in programming and help......
Emailing the Rendered Output of an ASP.NET Web Control in ASP.NET 2.0
In a previous 4Guys article, Emailing the Rendered Output of an
ASP.NET Web Control, I showed how to programmatically render the HTML of an ASP.NET Web control (such as a GridView)
and then send that HTML through email. This technique is useful in scenarios where you want to let the user email ......
Output Caching in ASP.NET 2.0
One of the most sure-fire ways to improve a web application's performance is to employ caching. Caching takes some expensive
operation and stores its results in a quickly accessible location. ASP.NET
version 1.0 introduced two flavors of caching:
Output Caching - caches the entire rendered mar......
Storing Binary Files Directly in the Database Using ASP.NET 2.0
In building a data-driven application, oftentimes both text and binary data needs to be captured. Applications might need
to store images, PDFs, Word documents, or other binary data. Such binary data can be stored in one of two ways:
on the web server's file system, with a reference to the file ......
Creating CSS Friendly Websites with ASP.NET 2.0
One of the features of ASP.NET 1.0 was its adaptive rendering capabilities that allowed
for the markup rendered by an ASP.NET web page to be appropriate for the visiting browser. In short, when an ASP.NET page is visited
its Web controls are rendered into markup that is sent down to the browser ......
Client-Side Enhancements in ASP.NET 2.0
ASP.NET's model of Web controls, server-side event handlers, and view state work in unison to help blur the lines
between the client and the server. In short, a developer designing an ASP.NET web page can think in terms of higher-level
abstrations - TextBoxes, Buttons, Click events, and so on -......
Techniques for Uniquely Identifying Database Records
When designing and creating a data model for a data-driven application, the records in tables must each be uniquely identifiable.
By having a unique value associated with each record, individual records can be selected, updated, or deleted. Being able
to uniquely identify records is so importan......
Accessing and Updating Data in ASP.NET 2.0: Creating Custom Parameter Controls
A Multipart Series on ASP.NET 2.0's Data Source Controls
ASP.NET 2.0 introduced a number of new Web controls designed for accessing and modifying data.
These controls allow page developers to declaratively access and modify data without writing any
code to perform the data access. This article i......
Creating a Tag Cloud in ASP.NET
A tag cloud is a way to display a weighted list such that the
weight of each item is reflected by the size of the item's text. Tag clouds provide a quick way for one to eyeball a list and
ascertain what items are more prevalent. Oftentimes, each item in a tag cloud is rendered as a link that, w......
Examining ASP.NET 2.0's Membership, Roles, and Profile - Part 7
A Multipart Series on ASP.NET 2.0's Membership, Roles, and Profile
This article is one in a series of articles on ASP.NET 2.0's membership, roles, and profile functionality.
Part 1 - learn about how the membership features
make providing user accounts on your website a breeze. This article cover......
Examining ASP.NET 2.0's Membership, Roles, and Profile - Part 6
A Multipart Series on ASP.NET 2.0's Membership, Roles, and Profile
This article is one in a series of articles on ASP.NET 2.0's membership, roles, and profile functionality.
Part 1 - learn about how the membership features
make providing user accounts on your website a breeze. This article cover......
Accessing and Updating Data in ASP.NET 2.0: Retrieving XML Data with XmlDataSource Control
A Multipart Series on ASP.NET 2.0's Data Source Controls
ASP.NET 2.0 introduced a number of new Web controls designed for accessing and modifying data.
These controls allow page developers to declaratively access and modify data without writing any
code to perform the data access. This article i......
Creating Validator Controls for the CheckBox and CheckBoxList
ASP.NET provides a variety of validation Web controls that can be used to validate a user's form field inputs.
(See Form Validation with ASP.NET - It Doesn't Get Any Easier!
for general information on the validation Web controls and Dissecting
Validation Controls in ASP.NET 2.0 for the validat......
Gracefully Responding to Unhandled Exceptions - Displaying User-Friendly Error Pages
In .NET applications, an illegal operation - an invalid cast, attempting to reference a null value, trying to connect to a database
that's been taken offline, and so on - raises an exception. Exceptions can be caught and handled directly in code
through the use of Try / Catch blocks. For ASP.NE......
Gracefully Responding to Unhandled Exceptions - Processing Unhandled Exceptions
When an unhandled exception occurs in an ASP.NET application, the visitor is, by default, shown
either a "Runtime Error" or
exception details page (which of the two pages is displayed
depends upon the website's configuration and whether the visitor has come through localhost).
Ideally, such e......
Using the TreeView Control and a DataList to Create an Online Image Gallery
IntroductionASP.NET version 2.0 includes a wide array of Web controls not found in
previous versions. One such control is the TreeView, which is ideal for displaying hierarchical data. The TreeView control
can be bound to a hierarchical data source such as the XmlDataSource or SiteMapDataSource, ......
Programmatically Creating Context-Sensitive Help on a Web Page
In last week's article, Creating Context-Sensitive Help on a Web Page,
we looked at how to associate rich help "tooltips" with certain regions in the browser. With a bit of client-side JavaScript
and HTML markup, this previous article illustrated how to have a help window with images and rich t......