ASP 101 - Active Server Pages 101
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates













ASP 101 is an
internet.com site
ASP 101 is an internet.com site
Developer
Downloads
International
Internet Lists
Internet News
Internet Resources
IT
Linux/Open Source
Personal Technology
Small Business
Windows Technology
xSP Resources
Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash
your e-mail address:



 Top ASP 101 Stories Top ASP 101 Stories
What is ASP?
VBScript Classes: Part 1 of N
Migrating to ASP.NET

QUICK TIP:
Autofix IIS Failures
Show All Tips >>
 Active Server News from 15seconds.com Active Server News from 15seconds.com
1) Microsoft's Three-Pronged Phish Attack
2) Microsoft Looks to Buddy List in EU Spat
3) Supercomputing With Microsoft
4) Microsoft to Block Sony DRM Rootkit
5) The Meaning of 'MemoGates'
 DevX .NET Content DevX .NET Content
- Serializing, Consuming, and Binding Generics in .NET 2.0
- Building Speech-Enabled Applications with ASP.NET
- How to Hide a ContextMenu
- Streamline your Data Connections by Moving to MARS
- Manage Custom Security Credentials the Smart (Client) Way


New  Reduce Web Form Spam by Checking Server Variables

Spam isn't just an e-mail problem anymore. Web forms are now a routine target of spammers. Whether your web site is a personal one just looking for feedback or a commercial site generating sales leads, getting dozens of entries for link exchanges or online gambling sites isn't anyone's idea of useful feedback.

New  Radio Button ASP.NET Sample Code

Hot on the heels of last week's Checkbox sample, this week, we're covering the checkbox's closest relative: the radio button. This sample code illustrates a number of different ways to use both the HTML radio input type and the RadioButton control from ASP.NET.

New  Checkbox ASP.NET Sample Code

Although dealing with checkboxes isn't difficult, it can be confusing. This sample code illustrates a number of different ways to use both the HTML checkbox form element and the ASP.NET Checkbox control. In addition to showing you how to set them up, it also covers how to retrive data from each of them.

New  ElseIf ASP.NET Sample Code

No it's not a typo... VB.NET's "ElseIf" really is different from "Else If" and this difference can be very useful. It starts out like any other "If Then," but there's no space between the "Else" and the next "If."

New  Basic Debugging in Classic ASP

While ASP.NET has some built in tools to aid in debugging, classic ASP is relatively lacking in that regard. This tip will show you an easy way to check the values of your application's variables and then stop execution before you do any database writes or anything else you might not want to do while testing.

New  Free Visual Studio 2005 E-Learning Courses from Microsoft

Microsoft is offering Free E-Learning Courses for Visual Studio 2005. Better hurry though... they're only free through November 17, 2005. Be sure to register and order the courses you want today. Once you order them you'll have access to the content for 90 days, but they're only free for a very limited time!

New  Simple Database ASP.NET Sample Code

It seems you can never make code simple enough. No matter how many database related samples I publish, I'm always getting requests for simpler ones. Well, this one is as simple as they get. This script connects to our SQL Server database, executes a basic query, and drops the results right into a DataGrid. You won't find any fancy formatting or cool tricks in this sample, just straight-forward code -- plain and simple.

New  .NET Framework 2.0 Available for Download

The long road to Visual Studio 2005, SQL Server 2005, and the .NET Framework 2.0 is finally winding down. Microsoft has just released the final versions of these products to manufacturing. While VS.NET and SQL Server 2005 are only available to MSDN subscribers, the .NET Framework 2.0 and SDK are free for anyone to download.

New  HTML-Formatted Email ASP.NET Sample Code

Tired of sending plain text email messages from your website? Now you don't have to... this sample will show you how to send email messages that can be as lively as a web page from ASP.NET.

New  Filtered Directory List ASP.NET Sample

This script allows users to search for files simply by entering any part of the filename. The implementation is easier then the classic ASP version thanks to the fact that the GetFiles method of the DirectoryInfo object will take an optional SearchPattern parameter and handle the filtering for us.

New  Filtered Directory List Classic ASP Sample

I recently received an email from a visitor who wanted to know what he could do when the number of files in a directory got too large to be easily browsed via our original directory listing script. This script is the result. It allows users to search for files simply by entering any part of the filename.

New  Basic Authentication at its Most Basic

Basic authentication has gotten a bad reputation over the years. So it's not as flexible as forms authentication and not as secure as NT Challenge Response, it has something going for it that neither of these does - it's basic - as in simple!

New  FAQ Answered: How do I display file sizes with commas in them?

One of our readers recently asked: "How do I display the file sizes with commas between every third digit for numbers 1,000 and larger in order to make the numbers easier to read?" While it's easy to build a funtion to accomplish this task, luckily you don't need to.

New  Building Limited Navigation Links Update

After downloading the limited links version of our paged database search script, one of our readers decided to send in an improved implementation that wraps the code up into a function and adds some CSS support. If you've ever wanted to be able to easily add previous and next links to your search results, then have we got the function for you.

New  DropDownList Navigation ASP.NET Sample Code

This sample code shows you how to fill an ASP.NET DropDownList control with site locations and have clients use it to navigate your site. It includes both the client-side javascript and server-side redirection code so that you can choose whichever you prefer.

New  Dynamic Form Fields ASP.NET Sample

In addition to the primary goal of programmatically creating and adding server controls to a web form dynamically, this script also illustrates a number of other cool .NET concepts including: using an ArrayList to populate a DropDownList, building a string using a StringBuilder, and hiding sections of a page using the Panel web control.

New  Dynamic Form Fields Classic ASP Sample

Sometimes when you're getting input from users you know exactly what to expect, but unfortunately that's not always the case. In cases where you don't, you need to be flexible when designing the forms to get this mystery data. This classic ASP script shows you how to generate a number of form fields dynamically based on user input and then read the values the user enters into those dynamically-generated fields.

New  Paged Database Search with Limited Navigation Links

After trying out our paged database search script, one of our visitors decided to send in an alternate version that doesn't display a link to every result page, but instead creates a limited set of links so that the display doesn't become unwieldy if your database contains a large number of records.

New  Database Multi-Sort ASP.NET Sample Code

This sample works just like our Database Sort sample except that it adds the ability to sort by multiple fields just by clicking on the field headings in sequence. The script will sort on as many fields as you want but it does remove duplicates to keep things logical.

New  Simple Web Log ASP.NET Sample Code

This is the ASP.NET version of our web logging script that will let you add news links or other little entries to a section on a web page. The section is displayed by including a text file in the page that displays the entries. You add new entries to the include file by simply filling out a web form.

New  Database Multi-Sort Classic ASP Sample

This works just like our Database Sort sample except that it adds the ability to sort by multiple fields just by clicking on the field headings. The script will sort on as many fields as you want but it does remove duplicates to keep things logical.

New  Simple Web Log Classic ASP Sample

Here's a little web logging script that will let you add news links or other little entries to a section on a web page. The section is displayed by including a text file in the page that displays the entries. You add new entries to the include file by simply filling out a web form.

New  Download ASP.NET Sample Code

It can be useful to allow web users to download files from your site. For many file types accomplishing this is trivial... just upload the file and link to it. This works great for things like zip files, setup programs, and many other file types that are simply downloaded by browsers by default. But what if you want users to download a file that browsers normally open?

New  Wizard (Multi-Page Form) ASP.NET Sample Code

This sample is the ASP.NET version of our classic ASP wizard. In the classic ASP version, the bulk of the script's code dealt with maintaining the form's state from page to page. Since ASP.NET handles the viewstate for us, we're left to focus on the display of the different pages and handling the button click events.

New  Wizard (Multi-Page Form) ASP Sample Code

Sometimes when you're collecting data via a web form, it's nice to split the form up into smaller pieces so that you don't overwhelm the users who are filling them out. That's the idea behind wizards. If you break long and/or complex tasks into smaller, easy to manage pieces, users are less intimidated by them.

New  Running Microsoft Access Stored Queries from ASP.NET

While you won't get the performance benefits you do with SQL Server, you can use stored queries in Microsoft Access to move the query text out of your ASP.NET code. In addition to helping you get used to the idea of stored procedures, it might also help lessen your vulnerability to SQL injection attacks.

New  Microsoft Announces "Atlas"

I recently got an email from one of my contacts at Microsoft announcing a new technology designed to make AJAX-style development easier. We probably won't see a working copy until the PDC, but it's nice to know something is at least in the works.

Word Wrap ASP.NET Sample Code

Carriage returns and line feeds don't count for much in HTML documents, but there are times when they're useful. This sample shows how to take a string and word wrap it to a certain length. This should be extremely helpful for email message bodies or when formatting with the <pre> tag.

Time-based Greeting ASP.NET Sample Code

Greet your visitors based on the time of day. A good example of working with times and dates.

Function Declaration and Usage ASP.NET Sample Code

For those new to programming or to ASP.NET, this sample shows you a basic example of declaring a function and two different ways to call it from your ASP.NET page.

Effective Data Paging Using SQL Server 2005 and Microsoft's Enterprise Library

Using the DataGrid's built in paging mechanism is a convenient and easy way to implement paging, but as your database grows you may notice a considerable delay while paging. The problem is that the DataGrid doesn't just get the records for the current page... it actually retrieves them all! This acticle shows you a more efficient way to handle paging using some of the new features in SQL Server 2005 and Microsoft's Enterprise Library.

Don't Use Select * in Database Queries

Something you see in a lot of database access code is a select statement that looks something like this:

SELECT * FROM TableName WHERE ...

While there's technically nothing wrong with it, using the SELECT * syntax could be stealing away precious performance from your application, and even it it's not now, it might someday soon.

Exporting HTML from Word

As editor of a site that often deals with contributed content, over the years I've converted quite a few Microsoft Word documents to HTML format. While Word's "Save as Web Page..." does work, the resulting HTML leaves quite a bit to be desired. Fortunately there is a better way. While it's not perfect, this method is just as easy and gives you a lot less bloat in the resulting HTML document.

Array ASP.NET Sample Code

Most variables that you deal with contain one value. Sometimes however, it's useful to store more than one value at a time. Arrays are one easy way to do this. This is an ASP.NET version of our classic ASP Array sample. It's similar to our classic ASP version with a few notable exceptions.

XML to DataGrid ASP.NET Sample Code

We've already shown you a couple ways to display XML file data on a web page using an XSL stylesheet, but sometimes it's useful to take it a step further and actually use the XML as a true data source. This sample shows you how to use an XML file as the data source of an ASP.NET DataGrid control.

URL Linker ASP.NET Sample Code

Let's say you've got a lot of documents that you're finally trying to get up on your web site. The only problem is, these were never meant to be on a web site! They've got URLs in them, but they're not hyperlinked and the thought of wading through all that text and adding the appropriate links isn't something you're looking forward to. Well then, this just might be the script for you...

Update: Validating Email Addresses with ASP

We've all been faced with the problem of validating an email address that a user has entered into one of our web forms. Too often the email validation stops at simply checking that the text submitted contains the "@" and "." characters, but for many applications this really isn't good enough. This article starts by breifly explaining the situation and then walks you through building a page that takes an email address and checks its validity by performing a MX lookup on the address's domain.

Update: Powerful Form Validation using ASP

The above article introduces some code that allows you to validate an email address by performing an MX Lookup on the its domain. This article shows you how to use that code along with some other tips and tricks to perform some really powerful form validation using ASP.

How to Protect Your Application Against Parameter Injection

Securing your web application against the hackers of the world is a difficult task. One of the most common techniques of remotely manipulating an application is parameter injection. This article will demonstrate a simple method of checking for valid parameters in an already written application.

Server.Execute ASP.NET Sample Code

This script is an ASP.NET version of our classic ASP Server.Execute sample. While Response.Redirect gets the job done, you can often accomplish the same tasks more efficiently using Server.Execute.

Server.Execute Sample Code

If you've been using ASP for any length of time, you've almost certainly used Response.Redirect to move a user from one page to another. While Response.Redirect gets the job done, it unfortunately requires a round trip to the client browser. While there are some situations where this is necessary, more often then not you can accomplish the task more efficiently using Server.Execute.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback


JupiterWeb networks:

internet.comearthweb.comDevx.com graphics.com

Search JupiterWeb:

Jupitermedia Corporation has three divisions:
JupiterImages, JupiterWeb and JupiterResearch

Copyright 2005 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Jupitermedia Corporate Info | Newsletters | Tech Jobs | Shopping | E-mail Offers