Beruflich Dokumente
Kultur Dokumente
PRACTICAL
FILE
ASP
Q1. Write the ASP code showing the use of Adrotator component.
<%
url=Request.QueryString("url")
If url<>"" then Response.Redirect(url)
%>
<html>
<body>
<%
set adrotator=Server.CreateObject("MSWC.AdRotator")
response.write(adrotator.GetAdvertisement("textfile.txt"))
%>
</body>
</html>
Q2. Write the ASP code showing the use of content rotator
component.
<html>
<body>
<%
set cr=server.createobject("MSWC.ContentRotator")
response.write(cr.ChooseContent("text/textads.txt"))
%>
</body>
</html>
End if
%>
<h2>do you like pizza:</h2>
<form name=voting for colors method=get action=counters.asp>
<input type=radio name=choice checked value=yes>yes
<input type=radio name=choice value=no> no
<input type=radio name=choice value=cs> Cant say
<br><input type=submit value=submit vote>
</form>
<h3>Current vote tally</h3>
<table border=1>
<tr>
<td width=100>Yes:
<td width=30><%=mycount.get(yescounter)%></td></tr>
<tr>
<td>No:</td><td><%=mycount.get(nocounter)%></td></tr>
<tr><td>Cant say: </td><td><%=mycount.get(cscounter)%></td>
</tr>
</table>
<br>
<center>This page has been visited
<%=mycount.increment(pgcount)%> times.</center>
</body>
</html>
Q5. Write ASP code for reading line beginning fromA.
<html>
<head>
<title>
Reading a file</title>
</head>
<body>
<%
Set fileobj=server.createobject(scripting.filesystemobject)set
myfile=fileobj.opentextfile(str.txt)
While NOT myfile.AtEndOfStream
S=myfile.readline
If left(S, 1)=A then
respone.write(S & <br>)
end if
wend
Myfile.close
%>
</body>
</html>
Q 6- Create a program to read a text file named data.txt and count
the number of vowels and consonants.
<html>
<head>
<title>vowels and consonants</title>
</head>
<body>
<%
Dim vowel, conson, special, ch
Count=0
Set fileobj=Server.CreateObject(Scriptin.FilesSystemObject)
Set Myfile=Fileobj.OpenTextFile(data.txt)
5. Now right click on the frame 15, 25, 35, 45 and insert a key
frame of all the layers.
6. Go to key frame 15 and 35 and make the color of the text
WHITE.
7. Now go to frame 25 and reverse the order of the color pattern
(VIBGYOR).
8. Now insert one more layer and create the bricks on the entire
stage leaving the area of the text in order to make it more
attractive and give a clear vision to your effect.
9. Go to Control => Test movie(Ctrl + Enter).To view your movie.
Q5. Create a movie in Flash using the concept of Frame by Frame
animation.
1. Insert Keyframe (F6)place object(s) on the stage
turn on
onion skinning, which will allow you to see the location of each
object as you progress through creating the animation move to
the next frame and Insert Keyframe make changes to object(s)
(reposition, color, size, etc) repeat steps 4 and 5 till you have
finished your animation
2. Control Menu --> Test Movie
VB-Script
Q1- Create a webpage to display the exam datesheet in the table
format.
<html> <head> <title>
Datesheet </title> </head>
<font face="comic sans ms" size="4">
<body>
<center><br>
<caption>"DATESHEET"</caption>
<br> <br>
<table border="2" bordercolor="green" cell spacing="20" cell
padding="30" align="center" size="4"><tr>
<td>SUBJECT
<td>DATES </tr>
<tr>
<td>english
<td>3-mar-12 </tr>
<tr>
<td>maths
<td>8-mar-12 </tr>
<tr>
<td>multimedia
<td>14-mar-12</tr>
<tr>
<td>physics
<td>18-mar-12 </tr>
<tr>
<td>chemistry
<td>21-mar-12 </tr>
<tr>
<td>biology
<td>27-mar-12</tr>
<tr>
<td>physical education
<td>30-mar-12 </tr>
</table> </center> </font>
</body>
</html>
fact=fact*k
next
document.write("factorial of " & num & "=" & fact)
</script>
</head>
</html>
here n is entered by the user.
Q4 Create a web page to show the multiplication table of a number A
till B , where A and B are entered by the user.
<html>
<script language="vbscript">
dim a, b, c
c=1
a=inputbox("enter the value of A")
b=inputbox("enter the value of B")
for c=1 to b step 1
d=a*c
document.write(a & "X" & c & "=" & d )
document.write("<br>")
next
</script>
</html>
Q5- Input a year and find put that year is a leap year or not.
<html>
<head>
<title>
Leap year
</title>
<head>
<body>
<script language="vbscript">
dim yr
yr=inputbox("Enter the year")
if yr mod 4=0 then
a=yr
msgbox"It is a leap year"
else
msgbox"It is not a leap year"
end if
</script>
</body>
</html>
Q 6-Write a script to change the background color of webpage
according to the users choice.
<html>
<head>
<title>
background change
</title>
</head>
<script language="vbscript">
sub b1_onclick
if document.form1.b1.value="pink"
then
document.bgcolor="pink"
document.form1.b1.value="white"
else
document.bgcolor="white"
document.form1.b1.value="pink"
end if
end sub
</script>
</head>
<body language="vbscript">
<form name="form1">
<H2>Click the button to change the
background color</H2>
<input type=button value="pink"
name="b1">
</form>
</body>
</html>
Q 7- Create a web page with log- in form that check for the username
and password entered by the user and flash an appropriate message.
<Html>
<head> <title>forms</title>
<script language="vbscript">
sub a_onclick
msgbox "Thanks for providing your details"
document.frm1.submit
end sub
</script>
</head>
<body>
<h1>Enter your details to login:</h1>
<form name="frm1">
<h2>Enter your Name: <input type="text" name="txtname"
size="20"><br><br>
Enter your Password: <input type="text" name="txtage"
size2"><br><br></h2>
<input type="submit" name="a" value="Submit">
</form>
</body>
</html>
MS-Access
Q1. Create two tables in MS-Access with 5 different fields(each field
using different data type) and create relationship between the two
tables.
HTML
Q1.
<html>
<body
bgcolor="green">
<h1><center><u><b><font color="blue">ABOUT AIR
RETURNS</font></b></u></h1>
<h3><font color="white">Air Return is India's first frequent flyer
programme, and one of the most rewarding programmes in the region.
<P>
As a member,you can earn mileage points when you fly Air India on
eligible fare paying tickets, and redeem them for award travel faster
than most programs . On higher fares,such as full fare economy,and on
Business/First Class,you can earn bonus miles , and clock points faster.
<P>
Interline eTicketing is the most recent, up-to-date ticketing method
that allows two carriers to electronically sell tickets on each other on
a single document. Interline eTicketing is the most updated ticketing
method that allows two carriers to electronically sell their tickets on
each others website on a single document. With more than 140
interline partners, you can now explore the world with them.
<P>
You can even earn and redeem mileage points on airline partners, and
earn miles on selected non airline partners.
<P>
Join Air Returns today, start collecting mileage points and you could
soon earn award tickets to a destination of your choice
</font>
</h3>
</html>
Q2.
<html>
<body bgcolor="cyan">
<h1><marquee>EXAM DATESHEET</h1></marquee><P>
<BR><BR><center><table border=5 bordercolor="red" cellpadding="10"
cellspacing="10" >
<tr>
<th>DATE
<th>SUBJECT </tr>
<tr>
<td>7 March
<td>MULTIMEDIA </tr>
<tr>
<td>9 March
<td>ENGLISH </tr>
<tr>
<td>11 March
<td>ECONOMICS </tr>
<tr>
<td>13 March
<td>ACCOUNTS </tr>
<tr>
<td>15 March
<td>BUSINESS STUDIES </tr>
<tr>
<td>17 March
<td>PHYSICAL EDUCATION</tr>
</table>
</body>
</html>
Q3.
<Html>
<frameset cols="20%, 80 %">
<frame src="info.html">
<frameset rows="80 %,*">
<frame src="as.html">
<frame src="astronomy.html">
</frameset>
</html>
Q4.
<html>
<body bgcolor="cyan">
<form>
<h1><u><bfont color="red"><center>RAILWAY
RESERVATION</center></font></b></u></h1>
Name   <input type="text"><br><br>
Gender<input type="radio" value="123">Male
<input type="radio" value="123">Female<br><br>
From   <input type="text"><br><br>
To  <input type="text"><br><br>
Adults(15 to 60)   <select>
<option>1</option>
<option>2</option>
<option>3</option></select>
Senior Citizens(60+)   <select><br>
<option>1</option>
<option>2</option>
<option>3</option></select><br><br>
Classes   <select>
<option>all classes</option>
<option>1A-AC First Class</option>
<option>2A-AC tier</option>
<option>3A-AC tier</option>
<option>3E-AC tier</option>
<option>CC-AC Chair Car</option>
<option>FC - First Class</option>
<option>SL-Sleeper</option>
<option>2S-Second Sitting</option>
</select><br><br>
Date   <select>
<option>1</option><option>2</option>
<option>3</option><option>4</option>
<option>5</option><option>6</option>
<option>7</option><option>8</option>
<option>9</option><option>10</option>
<option>11</option><option>12</option>
<option>13</option><option>14</option>
<option>15</option><option>16</option>
<option>17</option><option>18</option>
<option>19</option><option>20</option>
<option>21</option><option>22</option>
<option>23</option><option>24</option>
<option>25</option><option>26</option>
<option>27</option><option>28</option>
<option>29</option><option>30</option>
</select>   
MONTH   <select>
<option>JAN</option>
<option>FEB</option>
<option>MAR</option>
<option>APR</option>
<option>MAY</option>
<option>JUNE</option>
<option>JULY</option>
<option>AUG</option>
<option>SEP</option>
<option>OCT</option>
<option>NOV</option>
<option>DEC</option>
</select>
<p>
<input type="button" value="submit">
</form>
</html>