0% found this document useful (0 votes)
484 views

Lab Exercise 10 WEB APPLICATION USING

This document contains the code for a web form that calculates speed from distance and time inputs. It handles text changed events for the input and output text boxes. It also contains a button click event that calculates speed, selects a descriptive word based on the speed, and displays the results.

Uploaded by

Pabbura_Hati
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
484 views

Lab Exercise 10 WEB APPLICATION USING

This document contains the code for a web form that calculates speed from distance and time inputs. It handles text changed events for the input and output text boxes. It also contains a button click event that calculates speed, selects a descriptive word based on the speed, and displays the results.

Uploaded by

Pabbura_Hati
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

QUESTION 1 CODING FOR FORM:

Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub TextBox5_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles txtResult.TextChanged End Sub Protected Sub TextBox4_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles txtSpeed.TextChanged End Sub Protected Sub btnReset_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnReset.Click txtName.Text = "" txtDistance.Text = "" txtTime.Text = "" txtSpeed.Text = "" txtResult.Text = "" End Sub Protected Sub btnCalculate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCalculate.Click Dim Distance As Double Dim Time As Double Dim speed As Double Distance = txtDistance.Text Time = txtTime.Text speed = Val(Distance / Time) txtSpeed.Text = (" Dear " & txtName.Text & " your speed is " & speed) Select Case speed Case Is < 60 txtResult.Text = "Slow" Case 61 To 90 txtResult.Text = "Moderate" Case Is > 91 txtResult.Text = "Fast" End Select End Sub End Class

INTERFACE OUTPUT:

You might also like