Reader Level:
ARTICLE

Advertising on Mobile

On August 30, 2001 Articles | Mobile & Embedded
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
  • 7732

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

Shivani

Shivani is Electronics graduate from REC Bhopal, INDIA. After Electronics she jumped to software development and has been dealing with WAP and Java technologies. Currently she is working with C# and A...

  • 158rank
  • 424K readers
COMMENT USING

Trending up