Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have the Following Questions all in Visual Basic Write a line of code that wou

ID: 3849855 • Letter: I

Question

I have the Following Questions all in Visual Basic

Write a line of code that would display the date selected by the user in the TextBox shown in Figure 9-75.

In the ListBox object shown in Figure 9-76, write the lines of code that would display in a Label named lblSizeDisplay “You have selected size: Large” if the user selects “L”.

10. Explain the major difference between CheckBox and RadioButton objects.

11. What is the name of the property that assigns the object name to the validation control?

12. Which control validator confirms that the user enters the constant value of 17.1? 1

3. Which control validator checks if a value is between 6 and 30?

14. Which control validator confirms that a TextBox object is not left blank?

15. Write a line of code that would convert strResponse to all lowercase letters.

16. Write a line of code that would assign the length of a string named strCompany to the variable intSizeOfCompanyName.

17. Write a line of code that would display in a Label object named lblDisplayBirthday the date a user selected from a Calendar object named cldBirthdate.

18. How does the Image object in ASP.NET differ from an image in a Windows application?

19. In the browser window shown in Figure 9-77, name the type of validation and list any changes that were made in the Properties window.

What is the name of the page that serves as a template for the pages that are actually displayed in the browser?

Debugging Exercises

1. Fix the error(s) in the following line of code. decVideoTitle = strVideoTitle(Text.Length)

2. Fix the error(s) in the following lines of code. If (chkSpeedingTicket.Checked) = True Then decSpeedingTicket += 120 End If

3. What will be contained in the Text property of the lblResult Label object after executing the following code? Dim strPhrase As String strPhrase = “ Live long” strPhrase += “ and prosper ” strPhrase = strPhrase.Trim() lblResult.Text=strPhrase

4. What is the output of the following code? Dim strPhrase As String strPhrase = “Shut the front door” lblResult.Text= “Count =” & strPhrase.Length

5. Write the output that would be displayed in the Info label after the following statements are executed. lblInfo.Text = “Home Address: “ & “
” & “3506 Wards Rd” & “
” & “Lynchburg, VA 24 502”

Program Analysis

1. Name each of the property changes that are required in the Properties window for a Range Validator in order to validate that a TextBox named txtDeductibleRange contains a value in the range 12.50 up to and including 500.00. Display an error message that states “Please enter an acceptable deductible between 12.50 and 500”.

2. Write a Visual Basic statement that displays the length of a variable named strSentence in a Label object named lblStringLength.

3. Write the section of code that would display a list of services in a Label object named lblService if the user selects any of the corresponding CheckBoxes shown in Figure 9-78.

txtArrival Date Arrival Date: March 2012 Su Mo Tu We Th Fr Sa 26 2Z 28 1 2 3 11 12 13 14 15 16 17 21 22 23 24 cldSelect Date 18 19 20 25 26 27 28 29 30 31

Explanation / Answer

1.

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8">

<title>jQuery UI Datepicker - Default functionality</title>

<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>

<script type="text/javascript">

$(function() {

$("#txtDate").datepicker();

});

</script>

<style type="text/css">

.ui-datepicker { font-size:8pt !important}

</style>

</head>


<body>

<form id="form1" runat="server">

<div class="demo">

<b>Date:</b> <asp:TextBox ID="txtDate" runat="server"/>

</div>

</form>

</body>

</html>

10.

Radio Button:

A radio button or option button is a graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options

Checkbox:

A checkbox is a GUI widget that permits the user to make a binary choice, i.e. a choice between one of two possible mutually exclusive options.

Difference between Radio Button and Checkbox:

There is a fundamental difference between them. In a checkbox group, a user can select more than one option. Each checkbox operates individually, so a user can toggle each response "on" and "off." Radio buttons, however, operate as a group and provide mutually exclusive selection values.

11.ControlToValidate property

12.CompareValidator

13.RangeValidator

14.RequiredFieldValidator