CBSE Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2013 > Multimedia & Web Technology > Multimedia & Web Technology - by Mr. Amrit Chhetri

CBSE CLASS XII

Multimedia & Web Technology

Previous Index Next

 

SECTION-5 ( WEB DEVELOPMENT-ASP PROGRAMMING(III) 10/40 MARKS) :-

Q. 1. Give a difference between Read and ReadLine methods of the TextStream .

ANSWER-Q5.1:
Read is used to read the words but ReadLine is used to read the words from a line until the stream   reaches the end of the file.

Q. 2. What is full form of ADO? What Global.asa?

ANSWER-Q5.2:
ADO: ActiveX Data Object. Global.asa is the file which contains the SCRIPTS to be execute inside the Web Server.

Q. 3. A e-Learning Company company ,Future Learning wishes to design an ASP coded web page with the following specifications:

  1. To display a greeting message  “ Welcome to Virtual Classroom “ if the user access the website.
  2. With three hyperlinks pointing to AboutUs.asp, Activity.asp and ContactUs.asp ,below the greeting message.
  3. Field to display the number of visitors.

ANSWER-Q5.3:

<HTML>
<TITLE>Future Learning</TITLE>
<BODY>
<P>
Welcome to Virtual Classroom . Click the links below to know more about us.
<P>
<A HREF= "AboutUs.ASP"> About Us </A> <P>
<A HREF= "Activity.ASP"> Activities </A> <P>
<A HREF= "ConatctUs.ASP"> Contact Us </A> <P>
</P>
<%set pgCount = Server.Createobject("MSWC.PageCounter")%>
<%pgCount.PageHit%>
Visitors Count : <%=pgCount.Hits%>
</BODY>
</HTML>

Q. 4. Write the ASP code that will read the text file called TextFiles.txt, and displays the contents in upper case.

ANSWER-Q5.4:

<html>
<body>
<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("TextFiles") & "\TextFile.txt",1)
While not rs.AtEndOfStream
Dim lineRead
lineRead=RS.ReadLine                                   
Response.Write("<br>")
Response.Write UCASE(lineRead)
Response.Write("<br>")                      
Wend
%>
</body>
</html>

Q. 5. Write the ASP code that will read the text file called TextFiles.txt, and counts the number of words inside the file.

ANSWER-Q5.5:

<html>
<body>
<%
wordCount=0
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("TextFiles") & "\TextFile.txt",1)

While not rs.AtEndOfStream
Dim lineRead
lineRead=RS.ReadLine
wordsCount= wordsCount+(Ubound( Split(lineRead ," ")) +1)-1
Wend  
Response.Write("The number of Words:"  & wordsCount)
%>
</body>
</html>

 

Previous Index Next

Submitted By : Mr. Amrit Chhetri
Computer Science Trainer/Educator, Principal Business Consultant, Social Media Strategist
Mobile : +91-9911290373, +91-9717346736
Twitter : http://twitter.com/AmritChhetriB
Facebook : https://www.facebook.com/AmritChhetriB