Dot Net Framework
A)
Write a VB.NET program to accept sentences in text box and count the number of
words
and display the count in message box.
Answer :
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim str As String
str = TextBox1.Text
Dim I, Count As Integer
Dim arr() As Char = str.ToCharArray
For I = 0 To arr.Length - 1
If arr(I) = " " Then
Count =
Count + 1
End If
Next
MsgBox(Count + 1
& " words")
End Sub
End Class
Output :
B)
Write ASP.Net application for the following:
1. Create a table EMP(eno, ename,
edesignation, salary, joindate)
2. Insert a Record.
3. Update a record
Answer :
Output :
No comments:
Post a Comment