Set - 9

Question 11 :

< % iPos = Instr("Hello World","r") % >

Referring to the above, what is the value of iPos? 
A. 0
B. 1
C. 2
D. 8
E. 9

Answer :

Answer: E


Question 12 :

What are the tags necessary to be present within the <FORM > tag? 

Answer :

tag: Provides input spaces (text boxes, combo boxes, radio button, etc.) on a form called fields. It has three attributes TYPE, NAME and VALUE. TYPE provides the characteristics of the field and the NAME specifies a name to the field by which it can be referred.


Question 13 :

How do you create a recordset object in VBScript?

Answer :

Answer1 
//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) 

Answer2 

" 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 14 :

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

Answer :

Answer1.

document.forms['formName'].elements['comboName'].options[i].value

Answer2.

document.form_name.element_name.value


Question 15 :

What is the base class of Button control? 

Answer :

Listing from visual studio .net > Button Class

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ButtonBase
System.Windows.Forms.Button