Add Rotating Ads to Your Website
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

This 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

For 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.




Comments