Reader Level:
ARTICLE

Advertising on Mobile

Posted by Shivani Articles | Mobile & Embedded August 30, 2001
Finally,its possible to advertise on your mobile phones. Mobiles toolkit provides an add rotator control very similiar to the ad rotator control for the Web. This control will disply the Advertisement in the random manner picking from the XML File.
  • 0
  • 0
  • 7558

Finally, its possible to advertise on your mobile phones. Mobile toolkit provides an add rotator control very similar to the ad rotator control for the Web. This Control will display the Advertisement in the random manner picking from the XML file.

Just Check out the Example.

Source Code:

// Source Code Starts
//Here is the XML File named myAd.xml
<?xml version="1.0"?>
<
Advertisements>
<
Ad>
<
ImageUrl>http://urhostname:2526/smcreation.wbmp</ImageUrl>
<
NavigateUrl>http://www.smcreation.com</NavigateUrl>
<
AlternateText>Just Hello</AlternateText>
<
KeywordFilter>Hello</KeywordFilter>
<
Impressions>80</Impressions>
</
Ad>
<
Ad>
<
ImageUrl>http://urhostname:2526/smentertainment.wbmp
</ImageUrl>
<NavigateUrl>http://www.smentertainment.com</NavigateUrl>
<
AlternateText>Just Hi</AlternateText>
<
KeywordFilter>Hi</KeywordFilter>
<
Impressions>80</Impressions>
</
Ad>
</
Advertisements>
//And here is ur Main Code goes
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<mobile:Form runat="server" ID="Form1" NAME="Form1">
<
mobile:AdRotator runat="server" AdvertisementFile="myAd.xml" ID="Adrotator1" NAME="Adrotator1"/>
<
mobile:Label runat="server" ID="Label1" NAME="Label1">
Its Gonna Change
on Refresh
</mobile:Label>
</mobile:Form>
// Source Code End

COMMENT USING