.NET news » ASP.NET ASP.NET Rss Feed

Production Exception Logging for Dummies 101 (Updated)

Provides an easy-to-use "drop it in" Exception logging framework for ASP.NET 1.1 and 2.0 applications. Log to a database, receive an email with a description and a link to the reporting page with the exact exception, and even optional Syslog reporting. Complete article with source code downloads. Uses the new "Data" field in the .NET 2.0 Exception class.
4 Sep 2006, 07:04:20   Source: Production Exception Logging for Dummies 101 (Updated)   Tags: ASP.NET Debug

Using the TreeView Control and a DataList to Create an Online Image Gallery

the treeview control, when viewed through a browser.

ASP.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, or can be constructed programmatically.

One common source of hierarchical data is the web server's file system. In many scenarios, there may be a folder that contains subfolders and files that the user needs to be able to browse. Using the classes in the System.IO namespace, we can programmatically populate the TreeView with the directory structure of our website. Then, when the user clicks a folder, the selected folder's files can be displayed.

In this article we will examine how to create a simple image gallery web page that's a breeze to maintain. The image gallery lacks the bells and whistles found in more complex and feature-rich image galleries, but this one is a cinch to deploy and maintain. We'll be using two Web controls: a TreeView to list the folders and subfolders in which the images reside; and a DataList control that lists each image in the selected folder..

29 Aug 2006, 19:00:00   Source: Using the TreeView Control and a DataList to Create an...   Tags: ASP.NET

Compilation and Deployment in ASP.NET 2.0

It's crucial to understand how your ASP.NET code compiles in order to debug your Web applications effectively. ASP.NET 2.0 has changed the way compilation and deployment works, and in this article I'll dig in and show you how compilation works now and what has changed from ASP.NET 1.x.
17 Aug 2006, 19:00:00   Source: Compilation and Deployment in ASP.NET 2.0   Tags: ASP.NET

Web Control Enhancements in ASP.NET 2.0

I'm sure by now you've read more than your share of books and articles describing new ASP.NET 2.0 features. Master pages, themes, providers, etc., are all great, but have you read anything regarding custom Web control development and what has changed in 2.0? Well that's what I'm here to tell you. If you've become involved in control development, either through my articles or on your own, I'll describe some very cool enhancements that you can put to work right away in your controls using ASP.NET 2.0..
17 Aug 2006, 19:00:00   Source: Web Control Enhancements in ASP.NET 2.0   Tags: ASP.NET

Web Control Templates Explained

Programming for extensibility assures ease of maintainability in your design. Control templates offer this functionality to custom Web controls.
14 Aug 2006, 20:34:40   Source: Web Control Templates Explained   Tags: ASP.NET

Accessing Embedded Resources through a URL using WebResource.axd

Many of the built-in ASP.NET server controls require additional, external resources in order to function properly. For example, when using any of the ASP.NET validation controls, the controls rely on a bevy of JavaScript functions to perform their client-side validation. While each validation control could emit such script directly into the page's content, a more efficient approach would be to package these JavaScript functions into an external JavaScript file and then include that file in the page using <script src="PathToExternalJavaScriptFile" type="text/javascript" >. This would reduce the total page size and would allow the browser to cache the external JavaScript file (rather than having to send the JavaScript code down to the browser on each and every page visit/postback).

Prior to ASP.NET 2.0, such external resources that needed to be accessible to the visitor's browser had to be implemented as actual files on the file system. If you've worked with ASP.NET 1.x's validation controls, your pages have included a reference to a JavaScript file /aspnet_client/system_web/version/WebUIValidation.js and there is an actual file with that name residing in the web application's root. Such external resources hamper deployment - if you deploy your application from the testing server to production, it's imperative that the production server have the same external resources (WebUIValidation.js, in this case), in the same locations in the file system.

To remedy this, ASP.NET 2.0 allows for external resources to be embedded within the control's assembly and then be accessed through a specified URL. With the external images, JavaScript files, CSS files embedded in the control's assembly, deployment is a breeze, as all of the resources are now contained within the assembly (the .dll file). There are no external resources whose file names and location on the file system must map up. Once embedded into the assembly, these resources can be accessed from an ASP.NET 2.0 web page through a special URL (WebResource.axd)..

8 Aug 2006, 19:00:00   Source: Accessing Embedded Resources through a URL using...   Tags: ASP.NET

Sending Email in ASP.NET 2.0: HTML-Formatted Emails, Attachments, and Gracefully Handling SMTP Exceptions

This article looks at the advanced email-related options. Article covers how to send HTML-formatted emails, how to include attachments, and how to gracefully handle SMTP exceptions when sending an email (such as invalid relay server credentials or if the relay server is offline).
1 Aug 2006, 19:00:00   Source: Sending Email in ASP.NET 2.0: HTML-Formatted Emails,...   Tags: ASP.NET

Nine ASP.NET Site Navigation Problem Solutions: Part 1

Find out how to use ASP.NET 2.0's site navigation controls to not only make building site navigation displays simple, but also solve real-world problems, such as hiding selected pages, or displaying "breadcrumbs."
14 Jul 2006, 16:27:17   Source: Nine ASP.NET Site Navigation Problem Solutions: Part 1   Tags: ASP.NET

Build an ASP.NET Virtual Earth Map Server Control

Shows how to dynamically get the coordinates of the street address property and compute the exact Virtual Earth map tile, download and display in the control from memory. Supports aerial, road and hybrid images, image size, and zoom level.
8 Jul 2006, 18:41:16   Source: Build an ASP.NET Virtual Earth Map Server Control   Tags: ASP.NET

An Introduction to AJAX and Atlas with ASP.NET 2.0

Traditionally, web applications have left a lot to be desired from a user experience standpoint, due primarily to the "request/response" lifecycle. Any interaction with a page typically requires a postback to the web server (a "request"), which then performs any server-side tasks needed and returns the updated page's markup (the "response"). Outside of intranet-based applications, such behavior adds a bit of a lag when interacting with a page. One approach to improving the end user's experience is to use AJAX. AJAX is a technique for using JavaScript and the XMLHttpRequest object to make light-weight HTTP requests back to the web server from client-side script. Once a response is received, the web page's layout can be seamlessly refreshed using JavaScript to message the page's Document Object Model (DOM) and CSS settings. AJAX-enabled pages provide a slick, responsive user experience, making web-based applications function more like desktop-based ones.

In the past adding AJAX type behaviors to your web application was difficult and came with a steep learning curve since AJAX encompasses a bevy of technologies (JavaScript, XML, XmlHttpObject, HTTP requests, DHTML, and so on). With the advent of the ASP.NET Atlas framework, however, there is much less of a reason to feel so overwhelmed when it comes to AJAX!

20 Jun 2006, 19:00:00   Source: An Introduction to AJAX and Atlas with ASP.NET 2.0   Tags: Ajax ASP.NET