Expression® Web Design

Add Rotating Ads to Your Website

Tuesday, January 22, 2008
By now, you have probably heard of .NET in some way, shape, or form.  And maybe now you are saving your pages with an aspx extension.  This will allow you to use the AdRotator web server control that Expression Web has in its toolbox.   As usual, you can view a video tutorial on adding the ad rotator.

Create the XML File

New Page Dialog Box - XML PageThis XML file will have a few fields in it: ImageUrl, NavigateUrl, and AlternateText.  It is easily created in Expression Web. Go to File - New - Page.  In this dialog box, choose XML.  A new page will open and you will see something like <?xml version="1.0" encoding="utf-8" ?> in the source code. 

Now, you will create the <Advertisement> element.  In this you will add the properties above.  Each advertiser will have their own <ad> element.  In each <ad> element, you will have the ImageUrl, NavigateUrl, and AlternateText.  It will look something like:


<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad>
<ImageUrl>http://www.milehighmerchantaccount.com/images/
first-data-logo.gif</ImageUrl>
<NavigateUrl>http://www.milehighmerchantaccount.com/</NavigateUrl>
<AlternateText>Accept Credit Cards</AlternateText>
</Ad>

<Ad>
<ImageUrl>http://www.loudvoicesystem.com/images/voice.gif</ImageUrl>
<NavigateUrl>http://www.loudvoicesystem.com/</NavigateUrl>
<AlternateText>Toll-Free Virtual Offices</AlternateText>
</Ad>

<Ad>
<ImageUrl>http://www.loudfax.com/images/logo.gif</ImageUrl>
<NavigateUrl>http://www.loudfax.com/</NavigateUrl>
<AlternateText>Toll Free Fax Numbers</AlternateText>
</Ad>
</Advertisements>


You can see an the XML example (text example) that is running the Ad Rotator example.

Insert the .NET AdRotator

Behavior Task Pane - AdvertisementFileFor this, make sure that your Toolbox Task Pane is showing.  You can go to Task Panes - Toolbox to make sure this is checked.  You should see this somewhere probably on the right.  Now scroll down until you see ASP.NET Controls.  (You can also go to Insert - ASP.NET Controls - More ASP.NET Controls.)  You should see AdRotator.  Drag this over to the location you would like the ads to show up.

Now go to your saved .NET page and look under the Tag Properties Task Pane, scroll down until you see behavior under the tag properties. In the AdvertisementFile, enter the XML file name that you wish to use to manage the ads.

Hopefully the video tutorial will help you out on this one.

DeliciousDigg This PostNewsvineRedditTechnorati

Comments

Freeman said...

You make my day!

2/26/2008

Name
URL
Email
Email address is not published
Access Code secureimage
Please enter the access code
Remember Me
Comments




Join My Community at MyBloglog!



Feeds