Ex. No: 7
Date :
ASP USING COMPONENTS
AIM:
To write the program for creating ASP application using components
such as adrotator and browser type.
ALGORITHM:
Step 1: Start the program.
Step 2: Create the
advertisement.asp file for displaying the advertisement using adrotator
component.
Step 3: Create the
broswer.asp file for displaying the various supporting applications of
the current browsing using browser type.
Step 4: Create the ad.txt
file for monitoring the collection of advertisement for
advertisement.asp file.
Step 5: Create the
aspcomp.html page for linking the asp file.
Step 6: Copy and paste the
created files by creating folder in, C:\Inetpub\wwwroot.
Step 7: Now open the html
file and execute.
Step 8: Stop the program.
/*ASP USING COMPONENTS*/
ad.asp:
<html>
<marquee><h1><b><%response.write("Advertisement
Rotator")%></b></h1></marquee>
<br>
<center>
<%
dim a
set
a=server.createObject("mswc.adrotator")
response.write(a.getadvertisement("ad.txt"))
response.write(a.getadvertisement("ad.txt"))
response.write(a.getadvertisement("ad.txt"))
%>
</center>
</html>
ad.txt:
redirect
http:\\localhost\san\ad.asp
width 300
height 300
border
*
1.jpg
this is 1.jpg
4
2.jpg
this is 2.jpg
3
3.jpg
this is 3.jpg
2
aspcomp.html:
<html>
<form
name="f1" method="post" action="http:\\localhost\san\ad.asp">
<h3>Rotation
of Advertisement</h3>
<input
type="submit" value="click">
</form><br><br>
<form
name="f2" method="post"
action="http:\\localhost\san\brow.asp">
<h3>Features
of web browser</h3>
<input
type="submit" value="click">
</form>
</html>
brow.asp:
<html>
<marquee><h1>
<b><%response.write("FEATURES
OF WEB BROWSER")%></b>
</h1></marquee><br>
<%
dim b
set
b=server.createObject("mswc.browsertype")
response.write("Browser
supports java applets:-")%>
<b><%response.write(b.javaapplets)%></b></br>
<%response.write("version
of the browser:-")%>
<b><%response.write(b.version)%></b><br>
<%response.write("Major
version of the browser:-")%>
<b><%response.write(b.majorver)%></b>
<br>
<%response.write("Minor
version of the browser:-")%>
<b><%response.write(b.minorver)%></b>
<br>
<%response.write("Browser
supports ActiveX controls:-")%>
<b><%response.write(b.activexcontrols)%></b>
<br>
<%response.write("Browser
supports frames:-")%>
<b><%response.write(b.frames)%></b>
<br>
<%response.write("Browser
supports tables:-")%>
<b><%response.write(b.tables)%></b>
<br>
<%response.write("operating
system of the browser:-")%>
<b><%response.write(b.platform)%></b>
<br>
<%response.write("browser
runs on windows3.1x:-")%>
<b><%response.write(b.Win16)%></b>
<br>
<%response.write("Browser
still a beta version:-")%>
<b><%response.write(b.beta)%></b>
</html>
No comments:
Post a Comment
PLEASE ENTER THE VALUABLE COMMENTS