a) Discuss any three areas or application where ASP can be used.
Ans:
- Shopping carts
- Discussion groups
- Personal greetings
b) Explain with examples two ways in which server – side scripts can be added to an HTML document.
Ans:
- <%@ LANGUAGE= scripting language%>
- . <SCRIPT LANGUAGE=”vbscript” RUNAT= server>
c) Differentiate between static web page and dynamic web page.
Ans: A dynamic web page is an Active Server Page can. It can contain server-side scripts, built-in objects and additional Active-
X components whereas a static web page is a normal HTML page. It cannot have any scripts or additional components.
d) Name any three equivalent tools of ASP.
Ans: JSP, PHP, CGI and COLD FUSION
e) What is the significance of the option explicit statement?
Ans: A keyword “OPTION EXPLICIT” make it compulsory to declare all the variable using DIM key word otherwise it will show an error message .
f) What is the difference between a variable and a constant?
Ans: constants are like variables except that, once they have been assigned a value, they do not change. Constant defines with the CONST keyword.
g) Define keyword “ReDim Preserve”.
Ans: ReDim Preserve is used when the size of an array needs to be increased without losing the original data .
h) Define “For Each...........Next” loop.
Ans: It repeats the loop for each member of a specified collection of items. Specially for an array.
i) What is a cookie? What kind of information can be stored in cookies?
Ans: Cookies provide a means of identifying visitors. It also keeps
- Personal Information
- Information about an online transaction
j) Differentiate between an ASP Application and ASP Session.
Ans: Application object is used to share information among all users of a given application.
Session object is used to store information needed for a particular user session.
Unlike an application variable, separate copies of a session variable are created for each visitor to the Web site.
k) Describe the following
- AppendToLog Method
- Clear Method
- Flush Method
- Execute Method
Ans: AppendToLog Method (response object)-adds a string to the end of the web server log entry for the request.
Clear Method(response object)-erases any buffered HTML output.
Flush Method(response object)-send buffered output immediately.
Execute Method(server object)-execute an .asp file.
l) How many methods do the following components have? Name them.
- Page Counter
- Counter
- Content Rotator
- Ad Rotator
Ans: Page Counter - Three Method – Hits, Pagehit, Reset
Counter - Four Method – Set,Get,Increment,Remove
Content Rotator - Two Method – Choosecontent() , Getallcontent()
Ad Rotator - One Method – Getadvertisement()
m) Which are the two main object required to connect to a database using ASP?
Ans:
- Connection object – used to connect to a data source such as Microsoft SQL or Microsoft Access.
- RecordSet object – represents the rows of data or sets of records returned from a data source.
n) Differentiate between optimistic and pessimistic locking of a recordset.
Ans: optimistic locking , record by record. The provider lock records only when calling update method.
pessimistic locking , record by record. The provider lock records immediately after editing.