asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search





Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Code Samples
Components
Tools
New
Free
Downloads
Vendors
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

File 1: (call it adrot.txt)


***
REDIRECT redirect.asp
WIDTH 480
HEIGHT 60
BORDER 0
*
http://www.somesite.com/banner.gif
http://www.somesite.com
Visit Somesite Now!
4
http://www.anothersite.com/banner.gif
http://www.anothersite.com
Come on over to Anothersite!
4
http://www.yetanothersite.com/banner.gif
http://www.yetanothersite.com
Yetanothersite.com - your online widget retailer
2
***

File 2: (call it redirect.asp)


<%
   Response.Redirect Request.QueryString("url")
%>

File 3: (this is the code you put wherever you want a banner displayed)


<%
   Dim objAd
   Set objAd = Server.CreateObject("MSWC.AdRotator") 'Create the component
   Response.Write objAd.GetAdvertisement("adrot.txt") 'Get the ad from
adrot.txt and write the link
   Set objAd = Nothing 'Destroy the object
%>

Submitted by Peter McMahon



email this code sample to a colleague

Related Articles
Mar 25, 1998 - Collaboration Data Object and IIS 4.0
Collaboration Data Object (CDO) is a COM library designed to send mail through SMTP or Microsoft Exchange. If you install the SMTP server that comes with Microsoft Option Pack 4, you can send mail from an Active Server page using CDO. Because CDO is comes with Microsoft Option Pack 4, CDO is free.
[Read This Article]  [Top]
Mar 18, 1999 - Simple Web-Database System Application
In this article by Joung-ho Jay Jung, he will show how to connect an Access database to your Active Server Pages using Microsoft FrontPage. This is a beginning-level article with plenty of screen shots to show how to connect via ODBC, generate a SQL query in Access and construct the Active Server Page.
[Read This Article]  [Top]
Apr 15, 1999 - Web-Based Systems Integration: Basic Training
Drill Sargent Tanner describes the war that is involved with being a Web-Based Systems Integrator. He shares his unique perspective on being an Internet consultant including handling technologies, working as a team and dealing with clients.
[Read This Article]  [Top]
Apr 22, 1999 - How to Implement Different Types of Outlines in ASP
In this article Dima Khanine illustrates how to outline a web site and how to implement that outline in server side code.
[Read This Article]  [Top]
May 20, 1999 - User-Friendly Errors
Don Franke shows how to eloquently handle form validation on the server side using ASP and a well honed technique.
[Read This Article]  [Top]
Jun 18, 1999 - Using Functions to Control Form Elements
As Web sites become more powerful by integrating database functionality, we are forced to build more robust user interfaces for these sites. This article by Mike Tickle discusses the new generation of web site UIs that must be developed with all types of users in mind.
[Read This Article]  [Top]
Oct 14, 1999 - String Functions To Clean Up Your Forms
In this article, the eight string functions offered by Jason Stehle check data entered in an HTML text box and clean it up before it reaches the database. Stehle shows how these functions can structure the data so it meets the sometimes strict requirements of the destination database
[Read This Article]  [Top]
Feb 4, 2000 - Creation and Maintenance of Appealing ASP Pages with Dynamically Generated Contents
Boaz Sigelman shows how to seamlessly convert between HTML form entry and database storage. The article contains example and code that shows how to use the 1touch component.
[Read This Article]  [Top]
Feb 25, 2000 - Dynamically Generated and Validated Forms
When faced with a Web site that requires a new validated form to be designed on a regular basis by a nontechnical client, Gaddo Benedetti’s offers examples that help take the drudgery out of the work and give that user direct control over the site. Benedetti uses a database to define and store information about this complex form. The same database that will eventually hold the information that is submitted to the form can be used.. The form definition requires two tables; one for the form field definition and a second to hold subelements to each field, such as list options. Sample code is provided.
[Read This Article]  [Top]
Mar 2, 2000 - A Simple Solution for Implementing Customization to an Existing Web Site
When their boss told them to create a site-wide prefilled form that would cull information from the database fields of previously entered customer information forms, Ryan Keenan and Ryan Tuma’s solution was to create two interstitial pages that would limit the code necessary and their work load. The customer’s personal information automatically displays on pages where a form or application needs to be filled out, and this information comes from a table in a database containing this customer information. Their solution is offered here in a downloadable ZIP file. The pre-fill of information applied only to forms that asked for information contained in this Microsoft Access database table.
[Read This Article]  [Top]
Mar 16, 2000 - Reusable Mobile Forms
Eric Barr explains how Mobile Forms are used on Web sites that request users to enter personal data "just-in-time" -- the data is entered only when they want to use features that depend on that data, breaking up the personal data entry into small, less-intimidating forms. If several site features require the same piece(s) of data, the Mobile Form is used to display and process the same form on different Web pages without duplicating the same code everywhere.
[Read This Article]  [Top]
Jul 6, 2000 - Good Practices in Form Design
Compared to most elements of Web application design, HTML forms are refreshingly simple so you can focus more on business and data tier design. Nonetheless, it's still possible to spend an extraordinary amount of time developing and maintaining forms. With care, you can reduce the effort behind this task and produce better results as well.
[Read This Article]  [Top]
Jul 27, 2000 - Effect of Using Multiple Scripting Languages in ASP
Do you know what happens when you use multiple languages within your ASP page? Gopikrishna S throws light on how an ASP page behaves when multiple languages are used for server side scripting.
[Read This Article]  [Top]
Aug 3, 2000 - Recursive Functions
A function that calls itself repeatedly, satisfying some condition is called a Recursive Function. Using recursion, we split a complex problem into its single simplest case. The recursive function only knows how to solve that simplest case. You'll see the difference between solving a problem iteratively and recursively later.
[Read This Article]  [Top]
Sep 27, 2000 - Object Models 101
As important and pervasive as object models are in Microsoft products, many beginning programmers don't understand or leverage the power afforded by OMs. This article will explain why it is important to comprehend the OM paradigm and how to leverage its strength.
[Read This Article]  [Top]
Oct 12, 2000 - Developing ASP+ Pages Using JScript.NET
If you are a developer looking for information about creating ASP+ Pages using JScript.NET, this article helps you to understand the new syntax elements and how to apply them. The article is accompanied by the complete working source code.
[Read This Article]  [Top]
Oct 25, 2000 - ASP Data Access for Beginners
If you're an ASPiring developer looking for a solid foundation in dynamic Web site creation, then look no further. This article for ASP beginners details how to connect to a SQL Server 7.0 database using ActiveX Data Object (ADO) and Open Database Connectivity (ODBC).
[Read This Article]  [Top]
Mar 21, 2001 - ASP, ASP 3.0, and ASP.NET
Member of the discussion list explains the general differences among ASP, ASP 3.0 and ASP.NET
[Read This Article]  [Top]
Apr 24, 2001 - What Else Is There To Know?
A simple question about building a Web app. turns into a discussion about the present state of Web development. Members of the 15Seconds discussion list talks about what self-taught Web developers should do to take it to the next level.
[Read This Article]  [Top]
May 8, 2001 - How to Build a Forms Validation Library
Edward R. Myers explains how FormLib is a code framework that eliminates the tedious aspects of programming cross-browser client and server-side validation of input forms. Generate the validation code directly from the database structure and auto-fill the fields when editing an existing record. Include one JavaScript and one ASP file into your page and have the form post the results to itself.
[Read This Article]  [Top]
Sep 5, 2001 - Firing Events in a Shared Hosting Environment
Firing events on a Web server is an easy task. However most of the easy solutions require you to have your own dedicated IIS or SQL Server on the Internet to play with, a privilege not shared by many. In this article, Matthew Muller shows you how to get the same functionality in a shared hosting environment.
[Read This Article]  [Top]
Sep 11, 2001 - Randomizing a Recordset
Ed Myers' article shows several ways to use a SQL calculated field and the ORDER BY clause to arrange a recordset in random order. A simple tool is provided for verifying that the results are uniformly random. A technique for bubbling records with certain attributes to the top of an otherwise randomized list is also shown.
[Read This Article]  [Top]
Oct 23, 2001 - Application Architecture: An N-Tier Approach - Part 1
Learn about N-tier application architecture and realize that developing with multiple layers produces a flexible and reusable application for distribution to any number of client interfaces.
[Read This Article]  [Top]
Jan 2, 2002 - The ASP.NET Page Life Cycle
Solomon Shaffer explores the life cycle of an ASP.NET page from initialization to unloading. He also explains the various methods to override ASP.NET server-side events.
[Read This Article]  [Top]
Dec 19, 2001 - Application Architecture: An N-Tier Approach - Part 2
Rob Chartier creates a simple portable and reusable address book in .NET to demonstrate the power of N-tier application architecture. Complete source code included!
[Read This Article]  [Top]
Oct 23, 2001 - Application Architecture: An N-Tier Approach - Part 1
Learn about N-tier application architecture and realize that developing with multiple layers produces a flexible and reusable application for distribution to any number of client interfaces.
[Read This Article]  [Top]
Mar 27, 2002 - A Best Practice for Using ADO Objects
A few members of the 15 Seconds discussion list talk about the proper way to use methods in order to prevent ADO object errors.
[Read This Article]  [Top]
Apr 2, 2002 - Object-Oriented Programming for VBScripters
Feel intimidated by .NET? This article by Rob Chartier is designed to ease any level VBScripter (ASP) into .NET by clarifying some OOP concepts.
[Read This Article]  [Top]
Jul 1, 2002 - Protecting Your Web Application Against Dangerous Requests
Enrico Di Cesare provides a solution for hiding and securing querystring values that pass through a url.
[Read This Article]  [Top]
Jul 15, 2002 - Securing SQL Server for Web Applications
If your SQL Server is exposed to the Internet, then hackers are probing it. This article shows how to secure a SQL Server database that's being used with a Web application
[Read This Article]  [Top]
Jul 17, 2002 - Software Development: Steps To Better Ensure Success
There is never a guarantee of project success when endeavoring to build a sophisticated application. However, there are established steps to follow that will ensure a clear, concise scope, support for the team involved, and a solid opportunity for successful deployment.
[Read This Article]  [Top]
Aug 7, 2002 - Using MySQL in the Win32 Environment
Developers who don't want to spend a lot of money on SQL Server and who want a database that's more robust than Access may find MySQL to be a pleasant alternative. This introductory article covers the bare essentials for getting MySQL installed and running in the Win32 environment.
[Read This Article]  [Top]



Support the Active Server Industry


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers