• +91 9971497814
  • info@interviewmaterial.com

ASP Interview Questions Answers

Question 1 : What is the difference between ASP and HTML? Or Why ASP is better than HTML?

Answer 1 : - ASP executes code on the server side whereas the browser interprets HTML. - ASP can use any scripting languages - Gets feedback from the user and return information to the user - Create pages that will be customized to display only things that will be of interest to a particular user - Can edit contents of a web page by updating a text file or a database rather than the HTML code itself

Question 2 : What are the collections of Application Object?

Answer 2 : * Contents collection - contains all variables added via scripts in global.asa. * Static collection - contains the names of all objects.

Question 3 : How do you create a recordset object in VBScript?

Answer 3 : //First of all declare a variable to hold the Recordset object, ex- Dim objRs //Now, Create this varible as a Recordset object, ex- Set objRs=Server.CreateObject(ADODB.RECORDSET) ============= ” rs.MoveNext wend end if %’> *. Create Recordset object *. Place form field value in a variable named “param” *. Define query by concatenating strings and variable value *. Open RecordSet Object. Note that the first parameter is the Command Text. The second parameter is the Connection String. The Command Object and Connection Object are created implicitly. *. Make sure the RecordSet isn’t empty *. Begin executing a loop which goes through all records in the RecordSet. *. Write each record’s “firstname” and “lastname” fields to the page on a separate line. *. Move to Next Record.

Question 4 : What is a class in CSS?

Answer 4 : 1. A class allows you to define different style characteristics to the same HTML element. 2. class is a child to the id, id should be used only once, a css class can be used multiple times: div id=”banner” p class=”alert”

Question 5 : How do you get the value of a combo box in Javascript?

Answer 5 : 1. document.forms[’formName’].elements[’comboName’].options[i].value 2. document.form_name.element_name.value  

Question 6 : Why do we use Option Explicit?

Answer 6 : 1. To avoid multiple variables of the same name. 2. Correct answer is - This statement force the declaration of variables in VB before using them.

Question 7 : Name some of the ASP components?

Answer 7 : Ad Rotator component- a way to manage advertisements on the web site. Content Linker component - a technique to direct users through a set of pages on a web site by creating a list of URLs and description of the next and previous pages. Browser Capabilities component - allows to customize the page to the ability of the browser viewing it. Database Access component - allows to access data from the database

Question 8 : What is Extranet?

Answer 8 : An area of a web site available only to a set of registered visitors.

Question 9 : What are the event handlers of Application Object?

Answer 9 : Application_OnStart- This event will be fired when the first visitor hits the page. Application_OnEnd- This event runs when the server is stopped.

Question 10 : What is Application-scope?

Answer 10 : Application-scope means that variables (and objects) can be accessed from any ASP pages that is part of the application.

ASP Contributors

krishan

Share your email for latest updates

Name:
Email:

Our partners