Visual Basic Questions and Answers – Dynamic Web Pages

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

Answer: b
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

Answer: c
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

Answer: a
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.
advertisement
advertisement

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

Answer: d
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

Answer: b
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The ______ validator is used to verify that an entry matches a specific pattern.
a) CompareValidator
b) RegularExpressionValidator
c) RequiredFieldValidator
d) ValidationSummary
View Answer

Answer: b
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

Answer: c
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.
advertisement

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

Answer: c
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

Answer: a
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.
advertisement

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

Answer: c
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.