Go: ASP. NET advanced Applications (1)

Source: Internet
Author: User
Asp.net| Advanced ASP. NET Advanced Applications
7/25/2001 10:3:58 Pole new technology Studio Yesky




XML and its Application

XML is the abbreviation of standard extensible language and is the standard of future web programming. In this chapter, we will describe the application of XML in asp.net

Make an advertisement strip

In this program, we implement an XML language that will display different banners each time we visit the Web page. In this case, we've only invoked two ads
Source file: advanceapp\intro.aspx

The code for Intro.aspx is as follows:



<center> <title> Advertisement Bar Demo </title> </center>
<link rel= "stylesheet" href= "Intro.css"
<body>
<center>
<form action= "intro.aspx" method= "POST" runat= "Server"
<asp:adrotator advertisementfile= "Intro.xml" bordercolor= "Black" borderwidth=1 "server"/>
</form>
</center>
</body>

The code for Intro.xml is as follows:
<Advertisements>
<Ad>
<ImageUrl>./hp1.gif </ImageUrl>
<NavigateUrl> http://www.yesky.com </NavigateUrl>
<AlternateText> Welcome to visit! </AlternateText>
<Keyword> Computers </Keyword>
<Impressions>% </Impressions>
</Ad>

<Ad>
<ImageUrl>./hp2.gif </ImageUrl>
<NavigateUrl> http://www.yesky.com </NavigateUrl>
<AlternateText> Welcome Access </AlternateText>
<Keyword> Computers </Keyword>
<Impressions>% </Impressions>
</Ad>
</Advertisements>


In intro.aspx, we used the <asp:adrotator advertisementfile= "Intro.xml" bordercolor= "Black" borderwidth=1 "Server"/ > This statement embeds the Intro.xml file.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.