This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “Dynamic Web Pages”.
1. A ______ Web page contains controls with which the user can interact.
a) Static
b) Dynamic
c) Server
d) Client
View Answer
Explanation: A dynamic web page contains controls with which the user can interact. Dynamic HTML is an extension of HTML that allows Web authors and developers to create pages that dynamically update their content and interact with the user without relying on scripts or server-side processing. When you create a DHTML application, the resulting pages use the Dynamic HTML technology in Internet Explorer 4.x. Dynamic HTML’s object model allows you to interact with HTML pages in new ways — for example, manipulating their properties, methods, and events, and exercising finer control over the layout of the pages.
2. A button’s _______ event is used to run code.
a) OnClick
b) onclick
c) Click
d) click
View Answer
Explanation: A button’s click event is used to run the code, associated with that button. These are known as event handlers.
3. The ______ validator is used to compare an entry with a constant value or the property stored in a control.
a) CompareValidator
b) RangeValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer
Explanation: The CompareValidator might not be the most commonly used validator of the bunch, but it’s still useful in some cases. It can compare two values, for instance, the values of two controls whereas the Rangevalidator is used to verify that an entry is within the specified minimum and maximum values.
4. The ______ validator is used to display all of the validation error messages in a single location on aWeb page.
a) CompareValidator
b) RangeValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer
Explanation: The ValidationSummary control allows you to summarize the error messages from all validation controls on a Web page in a single location. The summary can be displayed as a list, a bulleted list, or a single paragraph, based on the value of the DisplayMode property. The error message displayed in the ValidationSummary control for each validation control on the page is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed in the ValidationSummary control for that validation control. You can also specify a custom title in the heading section of the ValidationSummary control by setting the HeaderText property.
5. The ______ validator is used to verify that an entry is within the specified minimum and maximum values.
a) CompareValidator
b) RangeValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer
Explanation: The Rangevalidator is used to verify that an entry is within the specified minimum and maximum values whereas the CompareValidator might not be the most commonly used validator of the bunch, but it’s still useful in some cases. It can compare two values, for instance the values of two controls.
6. The ______ validator is used to verify that an entry matches a specific pattern.
a) CompareValidator
b) RegularExpressionValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer
Explanation: The RegularExpressionvalidator is used to verify that an entry matches a specific pattern whereas the Rangevalidator is used to verify that an entry is within the specified minimum and maximum values and the CompareValidator might not be the most commonly used validator of the bunch, but it’s still useful in some cases. It can compare two values, for instance the values of two controls.
7. The ______ validator is used to verify that a control contains data.
a) CompareValidator
b) RangeValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer
Explanation: The RequiredFieldvalidator is used to verify that control contains data whereas the Rangevalidator is used to verify that an entry is within the specified minimum and maximum values and the CompareValidator might not be the most commonly used validator of the bunch, but it’s still useful in some cases. It can compare two values, for instance the values of two controls.
8. The ______ validator is used to verify that control contains data verify that an entry passes the specified validation logic.
a) CompareValidator
b) RangeValidator
c) CustomValidator
d) ValidationSummary
View Answer
Explanation: The CustomValidator is used to verify that a control contains data verify that an entry passes the specified validation logic whereas the Rangevalidator is used to verify that an entry is within the specified minimum and maximum values and the CompareValidator might not be the most commonly used validator of the bunch, but it’s still useful in some cases. It can compare two values, for instance, the values of two controls.
9. To make text appear around image ______ section is used.
a) Wrapping style
b) Text style
c) Image properties
d) Align
View Answer
Explanation: Wrapping style makes the text appear around image. In Visual Basic 6.0, the WordWrap property determines if text wraps to multiple lines when it is too long to fit in a label.
In Visual Basic 2008, the text in a Label control automatically wraps. The only way to prevent wrapping is to make the height of the Label control equivalent to a single line of text.
10. If you want text to appear to the left of the selected image control on a Web form, you would need to click which button in thePosition dialog box?
a) Align
b) AlignLeft
c) Left
d) Right
View Answer
Explanation: The keyword Left in the Position dialog box helps to make the text to appear to the left of the selected image control on a Web form.
Sanfoundry Global Education & Learning Series – Visual Basic.
To practice all areas of Visual Basic, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice Computer Science MCQs
- Buy Computer Science Books
- Apply for Visual Basic Internship
- Buy Visual Basic Books
- Apply for Computer Science Internship