ASP Multiple choices


Total available count: 25
Subject - Web Development
Subsubject - ASP

Global.asa is required for all Web sites


 

 

 

 



C


Solution:-

The Global.asa file
The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every web page in an ASP application.

Global.asa is used by all valid browser scripts like JavaScript, VBScript, JScript, PerlScript, etc.

The following only can contain by the Global.asa file :

  1. Application events
  2. Session events
  3. <object> declarations
  4. TypeLibrary declarations
  5. the #include directive

Note: Each application can only have one Global.asa file and the Global.asa file must be stored in the root directory of the ASP application.

A Global.asa file could look something like this:

<script language="vbscript" runat="server">

sub Application_OnStart
'some code
end sub

sub Application_OnEnd
'some code
end sub

sub Session_OnStart
'some code
end sub

sub Session_OnEnd
'some code
end sub

</script>

Example:-
The first example creates an object of session scope named "MySlightBook" by using the ProgID parameter:

<object runat="server" scope="session" id="MySlightBook" progid="MSWC.AdRotator">
</object>

 




Next 5 multiple choice(s)

1

Which one of these events is a standard Global.asa event?

2

If a user has cookies enabled, a session variable is available to all pages in one application.

3

All users of the same application share ONE Application object.

4

All users of the same application share ONE Session object.

5

Which ASP property is used to identify a user?

Comments