AspHeute.com - English Content Section
Welcome to the English content section of AspHeute! Here you can find our most popular high-tech
articles from various fields, most of them worldwide firsts in the respective fields. Written by
top-notch programmers, published first in German language.
All .NET articles are up to date for .NET 1.1!
All articles were translated from their German language originals, however, some screenshots and downloadable code listings
may still contain comments or labels in German. We apologize for this inconvenience.
The articles are organized in the following categories:
Persisting DataViews as DataTables
Accessing data via ADO.NET is very simple - data is stored as a DataSet and data can
then be read from the DataTables. Now imagine the following situation: you select all clients from the famous
Northwind database. You use a DataView to only display those customers who have
their company residence in Buenos Aires. No problem with that - except when you want
to pass on those clients (and only those) as a DataTable. There is no method on DataView
for performing this task.
"Fixing" the ASP.NET DataGrid
The default DataGrid-WebControl shipping with the .NET-Framework already is a powerful control
to display and edit data in table form. But when trying to implement the DataGrid in a fixed
layout site the sizing behavior of the DataGrid becomes a problem: the number of rows and with
it the height of the DataGrid may vary depending on the number of records to be displayed.
In a Class of its own - the .NET Zip Library
The .NET Framework contains several hundreds of classes, yet
something is missing: there is no class for compressing and
decompressing Zip archives. This omission however can be made up for
by using the .NET Zip Library (NZipLib) - it supports Zip as well as
GZip format, is free, and comes with C# source code included.
Obtaining Image Information on your own
A frequent problem in uploading image files is that the size (width, height) isn't known and
that consequently you have to determine them on your own.
With help from the .NET Framework, everybody can program his own ImageInfo component
without this project turning into an inordinate effort - you just have to use the Bitmap
class to your advantage. And presto - we have size information for 12 image file formats!
Programming the Sending of Emails yourself
There are (almost) as many email components as there are grains of sand on a beach, and many of them even are free.
Certainly (almost) everyone has used them, be it AspMail, CDONTS, SA-SmtpMail or
one of many others. Something that (almost) no one has done up to now is programming his or her own
email component. In today's article we will concern ourselves with the basics and send a very simple
email message. In future articles we will build on the source code presented today and will
finally have a fully functional component for HTML emails and attachments.
Sending Email with ASP.NET
Something found on every web page today is an email form. In all probability this will not
change anytime soon, therefore I will demonstrate today how to send email via ASP.NET: from plain to
HTML mail and attachments.
Using COM components in ASP.NET
In this article the author deals with a topic of interest for most new convertites to ASP.NET: how can
I use my own or third party COM components in the ASP.NET environment?
Uploading Files with ASP.NET
Something that could not reasonably be done under ASP without a third party
component was the uploading of files to the web server even though the uses of this
feature range from content management systems to online cost estimates for
translations (based on the content of uploaded files).
Directory Browsing the .NET Way
From the 'Good Old Times' of ASP programming, many should remember the FileSystemObject object.
It allows access to the file system for reading, writing and directory
browsing. However, the object model is anything but perfect, and
there are some other functions and properties which I would have liked to have.
It looks as if these wishes would be fulfilled by the .NET Framework classes in
the System.IO namespace. File processing was never easier and above all never
Displaying Event Log Entries the ASP.NET Way
Under Windows 2000 (or NT) the Event Log is about the most important source of
information for the administrator because all events that occurred are logged
there - from success to catastrophical failure. And as it is so important, what
would be more obvious than to make it accessible via the web?
WHOIS queries the .NET way
Quite often you want to know who owns a given domain. To obtain the registry information,
you go to the respective registry (DENIC, Network Solutions etc.) and start a so called
WHOIS query (lookup). The trick is that you have to know which registry is responsible for
for which TLD (Top Level Domain). Even if you had all the TLD/registry information - you'll
never remember the URLs of the query pages. There is no uniform one - yet! In today's article
such a page is just what we will code.
Performance Monitoring the .NET Way
In today's article I will show you how easy it is in ASP.NET to read performance counters - using the
System.Diagnostics Namespace of the .NET framework. You don't need external components like in ASP,
but get even more functionality instead. You can even reconstruct parts of the NT performance
monitor without spending too much time on it.
Generating graphics on the fly
Something that cannot be done in ASP without support by an external component is dynamic creation of
graphics - be it a diagram, a banner or just a simple graphical counter. This fortunately has changed
for ASP.NET - using built-in means, graphics can be created dynamically and sent to the client with a
maximum of configurability and ease.
Storing Passwords - done right!
In very many - not to say almost all - Web applications user data is administered, from Web forum
to Web shop. These user data encompass login information of the users which contain
the password besides the user name - and this in plain text. A security leak par excellence.
MS Script Encoder Decoded
In the article Obfuscating ASP Scripts I demonstrated how
ASP scripts can be rendered unreadable by means of the MS Script Encoder. I also said that this
will only work as a defense against the average user, but not against a determined attacker who really wants
to get at the source code. To emphasize this warning, today I will present a tool for inverting this
Trap Alert: Files that aren't
As a matter of fact, everybody ought to be familiar with the FileSystemObject - it is used for reading and writing files as
well as for certain important operations (e.g. deleting) on files and directories. However, it is little known what Windows (NT/2000)
actually considers to be a file - this goes well beyond files residing on disk drives.
Limiting Component Use
Anybody operating more than one site per server - and this concerns not only ISPs - will possibly confront the situation where a
component installed on the server is supposed to be accessible by certain Web sites only. The reason for this is that either the
customer paying for it is supposed to be the only one to use it (and not by other web sites coincidentally running on the same server) or
that certain components are security sensitive (e.g. business logic components).
Unbreakable Encryption Using One Time Pads
In the aftermath of the terrorist attacks on the World Trade Center the debate on the role
of encryption technologies in terrorist communications has - yet again - heated up. Focal point
in these discussions always is the use of backdoors in encryption algorithms by government
agencies - i.e. how agencies can listen in on communication without the consent of the
(encrypting) parties involved.
"Classic" ASP articles
Many users surfing the Net use so called banner blockers (ad blockers), which block advertising banners -
a well known tool in this category is the WebWasher. However, there are many Web sites on the Internet
financing their contents by means of banner advertising on their pages. For these Web sites, such tools as
the WebWasher truly are "Killer Apps" as they effectively filter out their source of revenue.
Creating an HTTP Testing Tool
Testing a Web site with various Browsers is part of a Web
developer's daily work - at least when not working on an Intranet
project where the Browser is company policy.
Browser tests allow for the recognition and removal of layout
problems and of client-side scripting problems. This however is
no guarantee that you can manipulate all details of the
connection between Web server and client, which can be important
for testing security and stability.
Safe Conversion of Reference Types
A topic that time and again turns out to be problematic for beginners is the conversion
("casting") of reference types (aka objects). Under C++ quite a lot of havoc could be
wreaked with this which fortunately cannot happen with C#. In spite of - or precisely
because of - the type safety of the language, one should get acquainted with the various
The ReDim Preserve Performance Trap
Whoever works with arrays in VB will be familiar with the ReDim statement for
resizing arrays. Today, I will explain in detail why you better shouldn't use this
statement in the future, or at least very, very carefully consider its use.
ASP and Macromedia Flash Articles
Manipulating Cookies in Flash via ASP
Flash does not support direct setting and reading of cookies. Thus, you either
scripts to set and read cookies. This has among other things the advantage that
All rights reserved. The content of these pages is copyrighted.
All content and images on this site are copyright. Reuse (even parts) needs our written consent.