Web Development

  Homes arrow Web Development arrow ch 1
 Webmaster Tools
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
Password Strength
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

ch 1
By: Developer Shed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0

    Table of Contents:

    Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    Make your own banner management system with ASP

    By: Mitchell Harper


    If you're like me, then you probably run one or more small sites that either provide information to your visitors, or sell a range of products and services targeted at a specific audience. You've got people that you trust managing and updating content, you've spent many, many hours of your time developing the site, and you may even attract a couple of thousand visitors to your site everyday.

    Along with the profits coming in from either membership charges or product sales, wouldn't it be nice to manage a simple banner rotation and stats system on your site? With this system, you could display a random banner at the top of every page on your site, track impressions and click-thrus, and, as your site gains credibility, you can reap the profits you make from allowing others to advertise on your site.

    What you'll need to continue:
    To create the simple app that I'm about to explain, you will need the following software:

    1. A webserver (preferably a Win2k box)capable of running ASP scripts
    2. SQL Server 2000
    3. Basic ASP knowledge
    4. Basic SQL Syntax and Enterprise Manager knowledge

    Project Overview:
    Basically, our simple project will do three things:

    1. Allow us to add and delete banners from our rotation schedule
    2.Display banners on our site using very simple ASP script
    3.Track impressions and click-thrus for each banner displayed on our site

    Let's start with the first step, adding and deleting banners from our rotation schedule. Don't worry if you don't understand any of the code, it will all make sense by the end of the article.

    Adding the banners

    In this step, we will develop a simple web page that will allow us to add banners to our rotation schedule. A rotation schedule is just a fancy name for the list of all of our banners (which will be stored in a database).

    Firstly, we will need to create a basic HTML form. This form will allow us to select an image for our banner and also create a name for this banner in the rotation schedule. Copy the code below and paste it into a file named addbanner1.asp.

    <title> My Banner Management Site </title>
    <body bgcolor="#ffffff">
    <form enctype="multipart/form-data" name="frmBanner" action="addbanner2.asp" method="post">
    <h1>Add a Banner</h1>
    Banner Image: <input type="file" name="banner_image">
    Banner Name: <input type="text" name="banner_name">
    Banner URL: <input type="text" name="banner_url">
    <input type="submit" value="Add Banner">

    Save addbanner1.asp into a directory which your web server can process (by default this directory is c:\inetpub\wwwroot) and then fire it up using your web browser. You should get a page that looks similar to this:

    The code behind this page is just simple HTML. The code is broken down into chunks and described below:

    <title> My Banner Management Site </title>

    The code above shows the opening HTML tags. Firstly, the <html> tag tells the browser to interpret the entire page as a HTML document. Next, the <head> tag tells the browser that we are describing some meta-data for our web page, the only metadata we are describing in our web page is the <title> tag, which sets the title in the top bar of our web browsers window. Lastly, the title tag is the closed (</title>) followed by the <head> tag.

    <body bgcolor="#ffffff">
    <form enctype="multipart/form-data" name="frmBanner" action="addbanner2.asp" method="post">
    <h1>Add a Banner</h1>
    Banner Image: <input type="file" name="banner_image">
    Banner Name: <input type="text" name="banner_name">
    Banner URL: <input type="text" name="banner_url">
    <input type="submit" value="Add Banner">

    Next, the <body> tag is used to represent the beginning of our document. Within the <body> tag, we also set the background colour of our page to white (#FFFFFF is the hexadecimal code for white).

    After this, the <form> tag tells our browser that we want to capture some information for processing. Notice the enctype="multipart/form-data" attribute of our form. This is the most important part of the whole page. It tells the browser that we want to upload our image, and to be ready to handle it in binary mode instead of the normal ASCII mode. The action="addbanner2.asp" attribute of the form tells the browser to send all of the information captured in this form to the addbanner2.asp page for processing.

    Secondly, we have our form elements, the first being a file box through which we can browse for our banner image. The second element is just a simple text box in which we can type the name of the banner and the third another text box for the URL that the banner will re-direct to when it is clicked. We've also got our submit button which tells the browser to submit our form to addbanner2.asp.

    Lastly, we end our form with the </form> tag and also tell the browser that we are at the end of our web page with the </html> tag.

    Top quality daily ASP, PHP and .NET articles, tutorials, news, reviews, interviews AND FREE EBOOKS! devArticles is the ultimate online resource for the serious web developer. Visit
    http://www.devarticles.com today!

    Continued >>


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Web Development Articles
    More By Developer Shed



    - On Page SEO for New Domains
    - Improve Your Site`s Speed
    - Safari Books Online Review
    - Creating an Estore From the Ground Up
    - Most Common SEO Mistakes Developers Make
    - Making the Most of Your Titles and Meta Desc...
    - Five Ways Using Flash Can Damage Your Site
    - A Web Designer`s Guide to Colors
    - Use Webstarts to Create a Free Site
    - More Than Just Looks. How Your Web Design C...
    - How to Design Content Pages
    - Mint Review
    - Make Your WordPress Website Look Professional
    - How to Create a Mobile Web Site
    - Meta Tags: Still Useful?

    Developer Shed Affiliates


    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap