November 23, 2017
Hot Topics:

More articles by Eric Smith


.NET Tip: Managing Development and Production Configuration Files

If you use one server to develop your applications and another to deploy them, you probably have to change your database connection settings each time you deploy your configuration files. Learn a quick fix for this problem.

Database Tip: Managing Transactions with a Stack

In development scenarios where you make multiple changes to the database, consider using transactions and, optionally, nesting transactions.

.NET Tip: Compressing/Decompressing Your Files

One of the many new libraries included with .NET 2.0 allows for compression and decompression of files using the gzip file format. Find out how to use it.

ASP.NET Tip: Adding Tracing to an Application

Tracing down errors in web applications and services is no easy task. To make it simpler, learn how to add trace statements to your code. They appear only when tracing is enabled on the web page or the web site.

.NET Tip: Exiting a Try/Catch Block

If you use a return statement within a Try/Catch block, there's a behavior you need to be aware of in your code.

ASP.NET Tip: Encrypting a Configuration File Section

ASP.NET 2.0 enables you to encrypt portions of your configuration file. You can pick a section in your Web.config file to encrypt and then decrypt.

ASP.NET Tip: Using the LoginName and LoginStatus Controls

Learn a nice, easy drop-in solution that helps your web site users log in and out without seeing the "artifacts" that you may have run into during previous implementations of your security code.

ASP.NET Tip: ASP.NET 2.0 Introduces FileUpload Control

Prior to ASP.NET 2.0, some HTML controls had ASP.NET equivalents and others didn't. ASP.NET 2.0 rectifies this inconsistency with the new FileUpload control.

ASP.NET Tip: Using the LoginView Control

The LoginView control added to ASP.NET 2.0 can replace some of the tedious code you've probably got in your ASP.NET 1.x applications.

Securing a Web Service the Low-Tech Way

A number of "low-tech" approaches for implementing security around your Web services don't involve a lot of extra coding.

.NET Tip: Creating a Collection of Your Objects

The generic collection introduced with .NET 2.0 allows you to create collections of your objects without having to design a new class.

.NET Tip: Comparing Strings Safely

The .NET Framework's built-in comparison functions don't handle nulls properly. Learn a couple of functions to take care of this for you.

ASP.NET Tip: Creating Paging for a Repeater Control

How do I implement paging within a Repeater control, you ask? Simple: Roll your own paging solution.

ASP.NET: Post Data Programmatically with "Webscraping"

If you have a Web-based application that doesn't support Web services, you perform "webscraping": a Web-based screen scraping using the HttpWebRequest and HttpWebResponse objects.

ASP.NET Tip: Testing Web Sites with HttpWebRequest

Web servers sometimes produce a Web page even if it has an error. To verify whether the server is actually running and not generating any Web errors, use the HttpWebRequest class to check the content of any ASP.NET page.

.NET Tip: Testing Network Services with the TcpClient Class

The TcpClient class enables you to test whether services such as FTP and SMTP/POP3 mail are running and responding properly.

.NET Tip: Creating a Simple Monitor with Ping

By using the Ping class, one of the many classes included in the .NET Framework Library, you can create a simple server monitor that ensures your servers are all responding to network traffic.

ASP.NET Tip: Persistent Logins Under ASP.NET 2.0

Under ASP.NET 1.x, the built-in FormsAuthentication method enabled persistent logins easily, but ASP.NET 2.0 has changed how the forms authentication tickets work.

ASP.NET Tip: Sending Mail with ASP.NET 2.0

The new System.Net.Mail library in ASP.NET 2.0 introduces some useful features, but it also includes bugs. Find out how they come into play when you send mail.

ASP.NET Tip: Binding to Alternate Data Sources

Sure, you can bind database-related objects to grids and repeaters, but what about binding your own objects to grids and lists? Learn how to build a class that can be bound to a Repeater without involving any databases.

ASP.NET Tip: Creating a Composite Web Control

Although easy to create, user controls are harder to share between projects. As an alternative, you can create a composite control, which is harder to create, but much easier to share between applications.

ASP.NET Tip: Creating an Atom XML Feed

Atom, the replacement for RSS, is quickly being adopted by many blogging software makers. Learn how to produce an Atom XML feed using a database table.

C# Tip: Creating a Password-Checking Function

Password security is an easy way to tighten access to any application. Use this function to check a password against a set of rules, as well as a set of previously used passwords.

ASP.NET Tip: Exporting Data to Excel

Enable your users to download data for use in Excel spreadsheets with a few easy tricks that leave all the hard formatting work to Excel.

.NET Tip: Creating and Using Your Own Events

Want to make managing the sequence of events within a Web page easier? Simply register for a custom event and run your code when the event occurs.

ASP.NET Tip: Using Nested Master Pages

The nested master page is a great way to manage the layout of your Web site without duplicating content on every page.

ASP.NET Tip: Selecting a Master Page at Runtime

Enable your Web application to select a master page dynamically at runtime based on whatever criteria you choose.

ASP.NET Tip: Control Access to a File Download

Learn a method for controlling how users download files from your ASP.NET applications.

ASP.NET Tip: Creating a Form Using PlaceHolder Controls

When you create a PlaceHolder control, an empty container to which you can add your controls, ASP.NET will remember the values for your dynamic controls and repopulate the data automatically.

.NET Tip: Searching System Event Logs for Valuable Info

System event logs can provide valuable information, but manually finding the worthwhile details in them can be difficult. Learn the easy, automated ways .NET provides for reading and searching event logs.

ASP.NET Tip: Control the Layout of Your Input Forms

Sometimes you need to vary the number and configuration of your controls to control the layout of your input forms. Learn how to set various attributes on the controls.

.NET Tip: Logging Exceptions to the Event Log

The system event log is a good place to store information about your .NET application, and writing entries to the event log is fairly straightforward. You can easily add the code for it to a utility class.

ASP.NET Tip: Using RadioButton Controls in a Repeater

The ASP.NET Repeater control is fully customizable, but if you try to add a RadioButton control into a Repeater, they won't work correctly. A simple JavaScript function is a reliable fix for this problem.

ASP.NET Tip: Create a Perpetual Page Footer

An outdated page footer can give the impression that your site is stale. With just a little HTML and code-behind, you can keep your footer perpetually current.

E-Commerce Tip: Programmatically Validate Credit Card Numbers

Employ this function in your e-commerce application to validate the credit card numbers your users enter.

.NET Tip: Create a Custom Configuration Section in .NET 2.0

Creating a custom configuration section in your configuration class will make it more modular and not reliant on the generic appSettings section in the configuration file.

.NET Tip: Create a Class with Overloaded Constructors

Overloading the constructor of a class, which is the method called when you instantiate an object, ensures that your object is populated with all the information it needs to operate properly.

Web Tip: Add Message and Confirmation Boxes Using JavaScript

By adding a JavaScript confirmation dialog to your Web application, you can help prevent users from doing something they will regret.

.NET Tip: Using a Parameter Array in Your Functions

When you're creating a function that needs a variable list of arguments, use a parameter array.

.NET Tip: Run ASP.NET 1.1 with ASP.NET 2.0 on Windows 2003

The .NET Framework 2.0 gets very fussy when you try to run both ASP.NET 1.1 and ASP.NET 2.0 sites in the same application pool. Learn how to support both versions on the same Windows 2003 machine.

ASP.NET Tip: Use the ItemDataBound Event of a Repeater

Learn how to work with the fields and data within ASP.NET's Repeater control using the ItemDataBound event. This feature enables you to perform a variety of useful functions.

ASP.NET Tip: Responding to the Repeater Control's ItemCommand Event

The Repeater control, like other ASP.NET data-bound controls, contains events to help you respond to the actions a user performs on controls within the Repeater. Learn how to respond to the ItemCommand event.

ASP.NET Tip: Create a Smart Property to Instantiate Your Objects

By creating smart properties to instantiate your objects, you can keep a single instance of an object without worrying about whether the object has been instantiated yet.

ASP.NET Tip: Create a ViewState Property

The ViewState used in ASP.NET provides a cleaner way to pass your own information while your page is running. Learn how it works.

ASP.NET Tip: Create a BasePage Class for All Pages to Share

Creating a shared Page class from which all your Web pages inherit allows the pages to share common functions, settings, and so forth without having to do much work.

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date