0% found this document useful (0 votes)
121 views64 pages

Multi-Function VB.NET Code Examples

The document contains source code for 8 different programs written in Visual Basic .NET with the following functions: 1. A currency conversion program that converts between Rupees, Dollars, Euros, and Canadian Dollars. 2. A basic calculator program with memory and recall functions. 3. A program that converts text between uppercase and lowercase. 4. A program that solves quadratic equations. 5. A program that calculates the factorial of a given number. 6. A program that determines if a character is a vowel or not. 7. A basic calendar program that displays the day, date, month, and year from a date picker. 8. A

Uploaded by

Keerthana R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views64 pages

Multi-Function VB.NET Code Examples

The document contains source code for 8 different programs written in Visual Basic .NET with the following functions: 1. A currency conversion program that converts between Rupees, Dollars, Euros, and Canadian Dollars. 2. A basic calculator program with memory and recall functions. 3. A program that converts text between uppercase and lowercase. 4. A program that solves quadratic equations. 5. A program that calculates the factorial of a given number. 6. A program that determines if a character is a vowel or not. 7. A basic calendar program that displays the day, date, month, and year from a date picker. 8. A

Uploaded by

Keerthana R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

MONEY CONVERSION

-SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
If [Link] = "Rupees" Then
Select Case [Link]
Case "Dollars"
[Link] = [Link] / 74.18
Case "Canadian Dollars"
[Link] = [Link] / 58.96
Case "Euros"
[Link] = [Link] / 87.39
Case "Rupees"
[Link] = "INVALID CONVERSION"
End Select
ElseIf [Link] = "Dollars" Then
Select Case [Link]
Case "Rupees"
[Link] = [Link] * 74.18
Case "Canadian Dollars"
[Link] = [Link] / 0.8
Case "Euros"
[Link] = [Link] / 1.18
Case "Dollars"
[Link] = "INVALID CONVERSION"
End Select
ElseIf [Link] = "Euros" Then
Select Case [Link]
Case "Dollars"
[Link] = [Link] * 1.18
Case "Canadian Dollars"
[Link] = [Link] * 1.46
Case "Rupees"
[Link] = [Link] * 87.39
Case "Euros"
[Link] = "INVALID CONVERSION"
End Select
ElseIf [Link] = "Canadian Dollars" Then
Select Case [Link]
Case "Dollars"
[Link] = [Link] * 0.8
Case "Euros"
[Link] = [Link] / 1.46
Case "Rupees"
[Link] = [Link] * 58.96
Case "Canadian Dollars"
[Link] = "INVALID CONVERSION"
End Select
End If
End Sub
End Class
-OUTPUT:
[Link] WITH MEMORY AND RECALL OPERATION

-SOURCE CODE:

Public Class Form1


Dim x As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim d As Integer

Dim o As Char
Private Sub ButtonClear_Click(sender As Object, e As EventArgs) Handles [Link]
[Link]()
End Sub

Private Sub ButtonMemory_Click(sender As Object, e As EventArgs) Handles [Link]


x = [Link]
[Link]()
End Sub

Private Sub ButtonRecall_Click(sender As Object, e As EventArgs) Handles [Link]


[Link] = x
End Sub

Private Sub Button0_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("0")
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("1")
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("2")
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("3")
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("4")
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("5")
End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("6")
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles [Link]
[Link]("7")
End Sub

Private Sub Button8_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("8")
End Sub

Private Sub Button9_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]("9")
End Sub

Private Sub ButtonPlus_Click(sender As Object, e As EventArgs) Handles [Link]


a = Val([Link])
o = "+"
[Link]()
End Sub

Private Sub ButtonMinus_Click(sender As Object, e As EventArgs) Handles [Link]


b = Val([Link])
o = "-"
[Link]()
End Sub

Private Sub ButtonDiv_Click(sender As Object, e As EventArgs) Handles [Link]


c= Val([Link])
o = "/"
[Link]()
End Sub

Private Sub ButtonMult_Click(sender As Object, e As EventArgs) Handles [Link]


d = Val([Link])
o = "*"
[Link]()
End Sub

Private Sub ButtonEquals_Click(sender As Object, e As EventArgs) Handles [Link]


Select Case o
Case "+"
[Link] = a + Val([Link])
Case "-"
[Link] = b - Val([Link])
Case "/"
[Link] = c / Val([Link])
Case "*"
[Link] = d * Val([Link])
End Select
End Sub
End Class
OUTPUT:
[Link] CONVERSION

SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
Dim str As String
Dim c As Char
Dim i As Integer

str = [Link]

For i = 0 To [Link] - 1
c = str(i)
If ([Link](c)) Then
[Link] = [Link] + [Link](c)
Else
[Link] = [Link] + [Link](c)
End If
Next i
End Sub
End Class
-OUTPUT:
[Link] EQUATION

-SOURCE CODE:

Imports [Link]
Imports [Link]

Public Class Form1


Public a, b, c, det, r1, r2 As Single
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]


[Link] = ""
[Link] = ""
If [Link] = "0" Then
MsgBox("Cofficient a must not be 0 !!!")
[Link] = ""
[Link]()
ElseIf [Link] = "" Or IsNothing([Link]) Or IsNumeric([Link]) = False Then
MsgBox("Cofficient a must have an numeric value !!!")
[Link] = ""
[Link]()
ElseIf [Link] = "" Or IsNothing([Link]) Or IsNumeric([Link]) = False Then
MsgBox("Cofficient b must have an nuberic value !!!")
[Link] = ""
[Link]()
ElseIf [Link] = "" Or IsNothing([Link]) Or IsNumeric([Link]) = False Then
MsgBox("Cofficient a must have an numeric value !!!")
[Link] = ""
[Link]()
Else
a = Val([Link])
b = Val([Link])
c = Val([Link])
det = (b * b) - (4 * a * c)
If (det > 0) Then
r1 = (-b + Sqrt(det)) / (2 * a)
r2 = (-b - Sqrt(det)) / (2 * a)
[Link] = "There are two roots :: "
[Link] = True
[Link] = True
[Link] = r1
[Link] = r2
ElseIf (det = 0) Then
r1 = (-b + Sqrt(det)) / (2 * a)
[Link] = "There is only one root :: "
[Link] = True
[Link] = r1
Else
[Link] = "There is no root !!!"

End If
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles [Link]


[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = False
[Link] = False
[Link]()
End Sub

Private Sub Texta_GotFocus(sender As Object, e As EventArgs) Handles [Link]


[Link]()
End Sub

Private Sub Textb_GotFocus(sender As Object, e As EventArgs) Handles [Link]


[Link]()
End Sub

Private Sub Textc_GotFocus(sender As Object, e As EventArgs) Handles [Link]


[Link]()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]()
End Sub
End Class
-OUTPUT:
[Link] OF A NUMBER

-SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
Dim n As Double
Dim i As Integer
Dim fact As Integer
fact = 1
n = Val([Link])

For i = 1 To n
fact = fact * i
Next

[Link] = fact
End Sub
End Class
-OUTPUT:
[Link] OR NOT A VOWEL

-SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
Dim c As Char
c = UCase([Link])
If c = "A" Or c = "E" Or c = "I" Or c = "O" Or c = "U" Then
[Link] = "Vowel"
Else
[Link] = "Not a Vowel"
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]()
End Sub
End Class
-OUTPUT:
[Link]

-SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles [Link]


[Link]()
[Link]()
[Link]()
[Link]()
End Sub
End Class
-OUTPUT:
[Link] EDITOR

-SOURCE CODE:

Public Class Form1


Dim quest(9, 3), ans(9, 1) As String
Public i As Integer = -1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]


quest(0, 0) = "Visual Studio .NET provides which feature:"
quest(0, 1) = "Application Deployment"
quest(0, 2) = "Syntax checking and Debugging"
quest(0, 3) = "All of the above"
quest(1, 0) = "Which property determines whether a control is displayed to the user?"
quest(1, 1) = "Enabled"
quest(1, 2) = "Show"
quest(1, 3) = "Visible"
quest(2, 0) = "The Java and Visual Basic .NET belong to which type of programming
language?"
quest(2, 1) = "High-level programming language"
quest(2, 2) = "Assembly language"
quest(2, 3) = "Object-oriented programming language"
quest(3, 0) = "What is used to store decimal data in .NET?"
quest(3, 1) = "BinaryWriter"
quest(3, 2) = "DecimalWriter"
quest(3, 3) = "HexaWriter"
quest(4, 0) = "A window that lists the solution name, the project name and all the
forms used in the project."
quest(4, 1) = "Properties Window"
quest(4, 2) = "Solution Explorer"
quest(4, 3) = "Windows Form Designer"
quest(5, 0) = "Which of the following converts the expression to String data type in
[Link]?"
quest(5, 1) = "CStr(expression)"
quest(5, 2) = "CSByte(expression)"
quest(5, 3) = "CShort(expression)"
quest(6, 0) = "Which of the following is a basic data type in [Link]?"
quest(6, 1) = "Boolean"
quest(6, 2) = "Byte"
quest(6, 3) = "All of the above"
quest(7, 0) = "The CancelButton property belongs to which object?"
quest(7, 1) = "Form"
quest(7, 2) = "Button"
quest(7, 3) = "Label"
quest(8, 0) = "Which of the following accesss modifier specifies that a property can
be written but not read?"
quest(8, 1) = "Widening"
quest(8, 2) = "WithEvents"
quest(8, 3) = "WriteOnly"
quest(9, 0) = "Which of the following statement declares a user-defined event?"
quest(9, 1) = "Event"
quest(9, 2) = "Operator"
quest(9, 3) = "Property"
ans(0, 0) = "All of the above"
ans(1, 0) = "Visible"
ans(2, 0) = "Assembly language"
ans(3, 0) = "BinaryWriter"
ans(4, 0) = "Solution Explorer"
ans(5, 0) = "CStr(expression)"
ans(6, 0) = "All of the above"
ans(7, 0) = "Form"
ans(8, 0) = "WriteOnly"
ans(9, 0) = "Event"
[Link] = True
[Link] = False
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles [Link]


i=i+1
If (i = 10) Then
[Link] = False
[Link] = True
[Link] = False
[Link] = False
[Link] = False
[Link]()
Else
[Link] = False
[Link] = False
[Link] = False
[Link] = quest(i, 0)
[Link] = quest(i, 1)
[Link] = quest(i, 2)
[Link] = quest(i, 3)

End If
End Sub

Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles


[Link]
ans(i, 1) = [Link]
End Sub

Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles


[Link]
ans(i, 1) = [Link]
End Sub

Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles


[Link]
ans(i, 1) = [Link]
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
Dim j As Integer
Dim count As Integer = 0
For j = 0 To 9
If ans(j, 0) = ans(j, 1) Then
count += 1
End If
Next
[Link] = True
[Link] = True
[Link] = count
End Sub
End Class
-OUTPUT:
[Link] WITH TIMER CONTROL

-SOURCE CODE:

Public Class Form1


Private Sub SaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link] = True
[Link] = True
[Link] = True
End Sub

Private Sub CloseToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub

Private Sub CutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub

Private Sub CopyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub

Private Sub PasteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles


[Link]
[Link]()
End Sub

Private Sub Save_Click(sender As Object, e As EventArgs) Handles [Link]


[Link](CStr([Link]))
[Link] = False
[Link] = False
[Link] = False
End Sub

Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles


[Link]
End
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]


[Link] = False
[Link] = False
[Link] = False
End Sub
End Class
-OUTPUT:
[Link] DIALOG BOX USING FILE AND DIRECTORY CONTROLS

-SOURCE CODE:

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]
If [Link] = True Then
[Link]()
[Link] = [Link]
Else
[Link]()
[Link] = [Link]
End If
End Sub
End Class
-OUTPUT:
[Link] AND DROP OPERATION FOR TEXT

-SOURCE CODE:

Public Class Form1


Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]
[Link] = "Precipitation"
[Link] = "Evaporation"
[Link] = "Condensation"
End Sub
Private MouseIsDown As Boolean = False 'variable declaration

Private Sub TextBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles


[Link]
MouseIsDown = True
End Sub

Private Sub TextBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles [Link]


If MouseIsDown Then
' Initiate dragging.
[Link]([Link], [Link])
End If
MouseIsDown = False
End Sub
Private Sub TextBox4_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]
If ([Link]([Link])) Then
' Display the copy cursor.
[Link] = [Link]
Else
' Display the no-drop cursor.
[Link] = [Link]
End If
End Sub

Private Sub TextBox4_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link] = [Link]([Link])) Then
[Link] = [Link]([Link])
MsgBox("Correct !")
Else
MsgBox("Error")
End If
End Sub

Private Sub TextBox2_MouseDown(sender As Object, e As MouseEventArgs) Handles


[Link]
MouseIsDown = True
End Sub
Private Sub TextBox2_MouseMove(sender As Object, e As MouseEventArgs) Handles
[Link]
If MouseIsDown Then
' Initiate dragging.
[Link]([Link], [Link])
End If
MouseIsDown = False
End Sub

Private Sub TextBox5_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link] = [Link]([Link])) Then
[Link] = [Link]([Link])
MsgBox("Correct !")
Else
MsgBox("Error")
End If
End Sub

Private Sub TextBox5_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link]([Link])) Then
' Display the copy cursor.
[Link] = [Link]
Else
' Display the no-drop cursor.
[Link] = [Link]
End If
End Sub

Private Sub TextBox6_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link]([Link])) Then
' Display the copy cursor.
[Link] = [Link]
Else
' Display the no-drop cursor.
[Link] = [Link]
End If
End Sub

Private Sub TextBox6_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link] = [Link]([Link])) Then
[Link] = [Link]([Link])
MsgBox("Correct !")
Else
MsgBox("Error")
End If
End Sub

Private Sub TextBox3_MouseDown(sender As Object, e As MouseEventArgs) Handles [Link]


MouseIsDown = True
End Sub

Private Sub TextBox3_MouseMove(sender As Object, e As MouseEventArgs) Handles [Link]


If MouseIsDown Then
' Initiate dragging.
[Link]([Link], [Link])
End If
MouseIsDown = False
End Sub End Class
-OUTPUT:
[Link] AND DROP OPERATION FOR IMAGES

-SOURCE CODE:

Public Class Form1


Private mouseisdown As Boolean = False
Private comp As Boolean = False
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]
[Link] = True
[Link] = True
[Link] = True
End Sub

Private Sub PictureBox4_MouseDown(sender As Object, e As MouseEventArgs) Handles


[Link]
If Not [Link] Is Nothing Then
mouseisdown = True
End If
End Sub

Private Sub PictureBox4_MouseMove(sender As Object, e As MouseEventArgs) Handles


[Link]
If mouseisdown Then
[Link]([Link], [Link])
End If
mouseisdown = False
End Sub

Private Sub PictureBox5_MouseDown(sender As Object, e As MouseEventArgs) Handles


[Link]
If Not [Link] Is Nothing Then
mouseisdown = True
End If
End Sub

Private Sub PictureBox5_MouseMove(sender As Object, e As MouseEventArgs) Handles


[Link]
If mouseisdown Then
[Link]([Link], [Link])
End If
mouseisdown = False
End Sub

Private Sub PictureBox6_MouseDown(sender As Object, e As MouseEventArgs) Handles


[Link]
If Not [Link] Is Nothing Then
mouseisdown = True
End If
End Sub
Private Sub PictureBox6_MouseMove(sender As Object, e As MouseEventArgs) Handles
[Link]
If mouseisdown Then
[Link]([Link], [Link])
End If
mouseisdown = False
End Sub

Private Sub PictureBox1_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


[Link] = [Link]([Link])
If Not [Link] = 8 Then
[Link] = Nothing
End If
End Sub

Private Sub PictureBox1_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link]([Link])) Then
If ([Link] = 9) Then
[Link] = [Link]
Else
[Link] = [Link]
End If
Else
[Link] = [Link]
End If
End Sub

Private Sub PictureBox2_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


[Link] = [Link]([Link])
If Not [Link] = 8 Then
[Link] = Nothing
End If
End Sub

Private Sub PictureBox2_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link]([Link])) Then
If ([Link] = 9) Then
[Link] = [Link]
Else
[Link] = [Link]
End If
Else
[Link] = [Link]
End If
End Sub

Private Sub PictureBox3_DragDrop(sender As Object, e As DragEventArgs) Handles [Link]


[Link] = [Link]([Link])
If Not [Link] = 8 Then
[Link] = Nothing
End If
End Sub

Private Sub PictureBox3_DragEnter(sender As Object, e As DragEventArgs) Handles [Link]


If ([Link]([Link])) Then
If ([Link] = 9) Then
[Link] = [Link]
Else
[Link] = [Link]
End If
Else
[Link] = [Link]
End If
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]


CompareImages([Link], [Link])
If comp Then
[Link] = Nothing
End If
comp = False
CompareImages([Link], [Link])
If comp Then
[Link] = Nothing
End If
comp = False
CompareImages([Link], [Link])
If comp Then
[Link] = Nothing
End If

End Sub

Sub compareimages(ByVal img1 As Image, img2 As Image)


If img1 Is img2 Then
comp = False
MsgBox("SUCCESS")
Else
MsgBox("mismatch of images")
comp = True
End If
End Sub
End Class
-OUTPUT:
[Link] ROOM RESERVATION USING HTML SERVER CONTROLS

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication4._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


<p>
<asp:Label ID="Label1" runat="server" Font-Italic="False" Font-Names="Corbel" Font-
Overline="False" Font-Size="X-Large" Font-Underline="True" ForeColor="Black" Text="HOTEL
ROOM BOOKING USING [Link] "></asp:Label><br />
<asp:Label ID="Label2" runat="server" Font-Names="Malgun Gothic" Font-Size="Medium"
Text="Guest Name : "></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Height="31px" Width="173px"></asp:TextBox><br />
<asp:Label ID="Label3" runat="server" Font-Names="Malgun Gothic" Font-Size="Medium"
Text="Room Number:"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" ForeColor="Black" Height="37px"
Width="156px">
</asp:DropDownList><br />
<asp:Button ID="Button1" runat="server" Font-Bold="False" Font-Names="Maiandra GD"
Text="RESERVE ROOM" Width="130px" />
</p>
<p>
<asp:Label ID="Label4" runat="server" Font-Names="Lucida Sans Unicode" Font-
Size="Medium"></asp:Label>
</p>
</asp:Content>
-SOURCE CODE:

Public Class _Default


Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles [Link]
If Not IsPostBack Then
Dim i As Integer
For i = 1 To 10
[Link](i)
Next
End If
[Link] = False
End Sub

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]


[Link] = True
[Link] = "The room reserved for " & [Link] & " is Room No : " & [Link]
[Link]([Link])
If [Link] = 0 Then
[Link] = False
[Link] = "Sorry , No rooms availlable "
End If
End Sub
End Class
-OUTPUT:
[Link] A FORM USING HTML SERVER CONTROL

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication7._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


<p style="font-family: 'Lucida Sans Unicode'; font-size: small">
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Castellar" Font-Underline="True"
ForeColor="#336699" Text="Personal Details ~"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Width="121px"></asp:TextBox>
<asp:Label ID="Label7" runat="server" Font-Names="Lucida Sans Unicode" Text="Gender : "></asp:Label>
<asp:RadioButton ID="RadioButton1" runat="server" Text="Male " Width="63px" />
<asp:RadioButton ID="RadioButton2" runat="server" Text="Female" Width="90px" />
<asp:Label ID="Label11" runat="server" Font-Names="Lucida Sans Unicode" Text="Place Of Birth
:"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Width="123px"></asp:TextBox>
<asp:TextBox ID="TextBox3" runat="server" Height="16px" Width="118px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
<asp:TextBox ID="TextBox5" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Width="118px"></asp:TextBox>
<asp:Label ID="Label9" runat="server" Font-Names="Lucida Sans Unicode" Text="Fathers
Occupation :"></asp:Label>
<asp:TextBox ID="TextBox4" runat="server" Height="17px" Width="111px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>>
<asp:RadioButton ID="RadioButton3" runat="server" Text="Parent" />
<asp:RadioButton ID="RadioButton4" runat="server" Text="Guardian" />
<asp:Label ID="Label27" runat="server" Font-Names="Lucida Sans Unicode" Text="Date Of Birth
:"></asp:Label>
<asp:TextBox ID="TextBox13" runat="server"></asp:TextBox>
</p>
<p>
<asp:Calendar ID="Calendar2" runat="server" BackColor="White" BorderColor="#3366CC"
BorderWidth="1px" CaptionAlign="Right" CellPadding="1" DayNameFormat="Shortest" Font-
Names="Verdana" Font-Size="8pt" ForeColor="#003399" Height="162px" TabIndex="5" Width="240px"
SelectedDate="2002-04-08" VisibleDate="2002-04-01">
<DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
<NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
<OtherMonthDayStyle ForeColor="#999999" VerticalAlign="Middle" />
<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
<TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True" Font-
Size="10pt" ForeColor="#CCCCFF" Height="25px" />
<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
<WeekendDayStyle BackColor="#CCCCFF" />
</asp:Calendar>
<asp:Label ID="Label12" runat="server" Font-Bold="True" Font-Names="Castellar" Font-Underline="True"
ForeColor="#CC3300" Text="Contact Details ~"></asp:Label>
<asp:Label ID="Label13" runat="server" Font-Names="Lucida Sans Unicode" Text="Phone no
:"></asp:Label>
<asp:TextBox ID="TextBox6" runat="server" Height="20px" Width="154px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
<asp:TextBox ID="TextBox9" runat="server" Height="28px" Width="205px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
</p>
<p>
<asp:Label ID="Label14" runat="server" Font-Names="Lucida Sans Unicode" Text="Address
:"></asp:Label>
<asp:TextBox ID="TextBox7" runat="server" Height="56px" Width="177px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
<asp:Label ID="Label17" runat="server" Font-Names="Lucida Sans Unicode" Text="State :"></asp:Label>
<asp:TextBox ID="TextBox10" runat="server" Height="17px" Width="169px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
</p>
<p style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva,
Verdana, sans-serif; font-size: small">
<asp:Label ID="Label15" runat="server" Font-Names="Lucida Sans Unicode" Text="Country
:"></asp:Label>
<asp:TextBox ID="TextBox8" runat="server" Height="25px" Width="179px" Font-Names="Lucida Sans
Unicode" Font-Size="Small"></asp:TextBox>
<asp:Label ID="Label18" runat="server" Font-Names="Lucida Sans Unicode" Text="Nationality
:"></asp:Label>
<asp:RadioButton ID="RadioButton5" runat="server" Text="Indian" Width="63px" />
<asp:RadioButton ID="RadioButton6" runat="server" Text="Other" />
<p>
<asp:Label ID="Label20" runat="server" Font-Names="Lucida Sans Unicode" Text="Percentage secured in
12th :"></asp:Label>
<asp:TextBox ID="TextBox11" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Height="23px"></asp:TextBox>
<asp:Label ID="Label21" runat="server" Font-Names="Lucida Sans Unicode" Text="Percentage secured in
10th :"></asp:Label>
<asp:TextBox ID="TextBox12" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Height="22px"></asp:TextBox>
<asp:Label ID="Label22" runat="server" Font-Names="Lucida Sans Unicode" Text="Upload marksheets of
10 and 12 : "></asp:Label>
<asp:Label ID="Label28" runat="server" Font-Names="Lucida Sans Unicode" Text="Category
:"></asp:Label>
<asp:ListBox ID="ListBox1" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Small"
Height="25px" Width="103px">
<asp:ListItem>SC</asp:ListItem>
<asp:ListItem>ST</asp:ListItem>
<asp:ListItem>OBC</asp:ListItem>
<asp:ListItem>General</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:ListBox>
</p>
<p>
<asp:Label ID="Label25" runat="server" Font-Names="Lucida Sans Unicode" Text="Choose course ( First
Preference ) :"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" Font-Names="Lucida Sans Unicode" Font-
Size="Small">
<asp:ListItem>Data Analytics</asp:ListItem>
<asp:ListItem>Cyber Security</asp:ListItem>
<asp:ListItem>Machine Learning</asp:ListItem>
<asp:ListItem>Moral Hacking</asp:ListItem>
<asp:ListItem>Network Security</asp:ListItem>
<asp:ListItem>Artificial Intelligence</asp:ListItem>
<asp:ListItem>Cloud Computing</asp:ListItem>
<asp:ListItem>Robotics</asp:ListItem>
<asp:ListItem>NanoTechnology</asp:ListItem>
</asp:DropDownList>
</p>

<p style="font-size: small; font-family: 'Lucida Sans Unicode'">


<asp:Label ID="Label24" runat="server" Font-Names="Lucida Sans Unicode" Text="Preferred
Location :"></asp:Label>
<asp:CheckBox ID="CheckBox1" runat="server" Text="Mumbai" />
<asp:CheckBox ID="CheckBox2" runat="server" Text="Chennai" />
<asp:CheckBox ID="CheckBox3" runat="server" Text="Bangalore" />
<asp:CheckBox ID="CheckBox4" runat="server" Text="Delhi" />
<asp:CheckBox ID="CheckBox5" runat="server" Text="Goa" />
<asp:CheckBox ID="CheckBox6" runat="server" Text="Bombay" />
<asp:Button ID="Button1" runat="server" Height="30px" Text="SUBMIT" Width="83px" />

</asp:Content>

SOURCE CODE :

Public Class _Default


Inherits Page

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link]


MsgBox("Thank you for Registering at our University !!")
End Sub

End Class
-OUTPUT:
15. PRODUCT DETAILS USING WEB SERVER CONTROLS

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication5._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


<p>
<asp:Label ID="Label6" runat="server" Font-Names="Algerian" Font-Size="XX-Large" Font-
Underline="True" Text="ROYAL GROCERIES&nbsp;" ForeColor="#003399"></asp:Label>
<asp:Label ID="Label7" runat="server" Font-Names="Maiandra GD" Font-Size="X-Large" Font-
Underline="True" Text="The Items availlable in stock and for delivery are : "></asp:Label><br />
<asp:Button ID="Button3" runat="server" Font-Bold="True" Font-Names="Lucida Sans" Font-
Size="Medium" Height="28px" Text="GET COST --&gt; " Width="130px" />
<asp:Label ID="Label8" runat="server" Font-Bold="True" Font-Names="Lucida Sans Unicode" Font-
Size="Medium"></asp:Label><br />
</p>
<p>
<asp:Label ID="Label9" runat="server" Font-Names="Lucida Sans Unicode" Font-Size="Large"
Text="Enter Quantity : "></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Width="164px"></asp:TextBox><br />
<asp:Button ID="Button4" runat="server" Font-Bold="True" Font-Names="Lucida Sans" Font-
Size="Medium" Text="BUY ITEM " />
<asp:Label ID="Label10" runat="server" Font-Bold="True" Font-Names="Lucida Sans Unicode"
Font-Size="Large"></asp:Label><br />
<asp:Label ID="Label11" runat="server" Font-Names="Algerian" Font-Size="Medium"
ForeColor="#003399"></asp:Label>
</p>

</asp:Content>
-SOURCE CODE:

Public Class _Default


Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles [Link]
If Not IsPostBack Then
[Link]("Diary Milk")
[Link]("5 Star")
[Link]("Snickers")
[Link]("Gems")
[Link]("Munch")
End If
End Sub

Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles [Link]


Dim i As Integer
Dim cost As Integer
i = [Link]
If (i = 0) Then
cost = 50
ElseIf (i = 1) Then
cost = 20
ElseIf (i = 2) Then
cost = 40
ElseIf (i = 3) Then
cost = 15
ElseIf (i = 4) Then
cost = 10
End If
[Link] = "The Item chosen is " & [Link] & " and the cost is Rs . " & cost
End Sub

Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles [Link]


Dim qty As Integer
Dim total As Integer
qty = Val([Link])
Dim j As Integer
j = [Link]
If (j = 0) Then
total = qty * 50
ElseIf (j = 1) Then
total = qty * 20
ElseIf (j = 2) Then
total = qty * 40
ElseIf (j = 3) Then
total = qty * 15
ElseIf (j = 4) Then
total = qty * 10
End If
[Link] = "The total price to be paid is Rs. " & total
[Link] = " Thank you for shopping with us !! "
End Sub
End Class
-OUTPUT:
[Link] FORM USING VALIDATOR CONTROLS

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication12._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


<p>
<asp:Label ID="Label1" runat="server" Text="LOGIN FORM"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="Enter the username :"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="*Please type the username"></asp:RequiredFieldValidator>
<asp:Label ID="Label3" runat="server" Text="Enter the Password :"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</p>
<p>
<asp:Label ID="Label4" runat="server" Text="Retype the Password :"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox2"
ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="*Password
Mismatch"></asp:CompareValidator>
<asp:Label ID="Label5" runat="server" Text="Enter the Email Id :"></asp:Label>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox4" ErrorMessage="*Enter Valid emailID" ValidationExpression=
"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
<asp:Label ID="Label6" runat="server" Text="Enter the Age :"></asp:Label>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage=" *Age must be between 20-30"
MaximumValue="30" MinimumValue="20"></asp:RangeValidator>
<asp:Label ID="Label7" runat="server" Text="Enter the mobile no.:"></asp:Label>
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*Type valid
mobilenumber"></asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="SUBMIT" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</p>
</asp:Content>
-SOURCE CODE:

Public Class _Default


Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles  [Link]
End Sub

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles [Link] If ([Link])


Then
[Link] = "Your Form has been Submitted ~"
Else
[Link] = "Error Loading Form , Please Retry "
End If

End Sub
End Class
-OUTPUT:
[Link] CONTROL

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication8._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
</p>
<asp:Label ID="Label1" runat="server" Font-Names="Algerian" Font-Underline="True"
ForeColor="#6600FF" Text="FRESH BOUQUETS"></asp:Label>

<asp:Label ID="Label2" runat="server" Font-Names="Baskerville Old Face" Font-Size="Medium"


Text="Presenting the best online flourist shops for 24h delivery, colorful blossom bouquets at your desired
place -!"></asp:Label>

<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/[Link]" />


&nbsp;</p>

<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Javanese Text" Font-


Underline="True" ForeColor="Fuchsia" Text="Use our coupon TRYNEW425 to get 50% OFF at your first
delivery !!"></asp:Label>
<p>
<p>
<asp:Label ID="Label5" runat="server" Font-Names="Algerian" Text="THANK YOU : )"></asp:Label>

</asp:Content>
-SOURCE CODE:

<?xml version="1.0" encoding="utf-8" ?>


<Advertisements>
<Ad>
<ImageUrl>[Link]</ImageUrl>
<NavigateUrl>[Link]
<AlternateText>
Blue Bouquets @125 , Here
</AlternateText>
<Impressions>20</Impressions>
<Keyword>Chennai,Flower Aura</Keyword>
</Ad>

<Ad>
<ImageUrl>[Link]</ImageUrl>
<NavigateUrl>[Link]
<AlternateText>Order imported UK flowers</AlternateText>
<Impressions>20</Impressions>
<Keyword>Get free vouchers</Keyword>
</Ad>

<Ad>
<ImageUrl>[Link]</ImageUrl>
<NavigateUrl>[Link]
<AlternateText>Send flowers anywhere in India</AlternateText>
<Impressions>20</Impressions>
<Keyword>Gift</Keyword>
</Ad>

<Ad>
<ImageUrl>[Link]</ImageUrl>
<NavigateUrl>[Link]
<AlternateText>Exquisite Tulip Collectkion</AlternateText>
<Impressions>20</Impressions>
<Keyword>Red,Black</Keyword>
</Ad>
</Advertisements>
-OUTPUT:
[Link] CONTROL

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication9._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">


<p >

<asp:Label ID="Label1" runat="server" Font-Names="Algerian" Font-Size="X-Large" Font-


Underline="True" Text="HOLIDAYS IN THE MONTH OF NOVEMBER"></asp:Label>

<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="Black"


DayNameFormat="Shortest" Font-Names="Times New Roman" Font-Size="10pt" ForeColor="Black"
Height="390px" NextPrevFormat="FullMonth" SelectedDate="2021-10-22" TitleFormat="Month"
Width="620px">
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" ForeColor="#333333"
Height="10pt" />
<DayStyle Width="14%" />
<NextPrevStyle Font-Size="8pt" ForeColor="White" />
<OtherMonthDayStyle ForeColor="#999999" Wrap="False" />
<SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
<SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-
Size="8pt" ForeColor="#333333" Width="1%" />
<TitleStyle BackColor="Black" Font-Bold="True" Font-Size="13pt" ForeColor="White"
Height="14pt" />
<TodayDayStyle BackColor="#CCCC99" />
</asp:Calendar>

</p>
</asp:Content>
-SOURCE CODE:

Public Class _Default


Inherits Page
Dim Holidays(13, 31)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles [Link]

Holidays(11, 19) = "Guru Nanak Jayanthi"


Holidays(11, 4) = "Diwali"
End Sub

Private Sub Calendar1_DayRender(sender As Object, e As DayRenderEventArgs) Handles


[Link]
If [Link] Then
[Link]()
Else
Dim adate As Date = [Link]
Dim aholidays As String = Holidays([Link], [Link])
If (Not aholidays Is Nothing) Then
Dim alabel As New Label()

[Link] = "<br>" & aholidays


[Link](alabel)
End If
End If
End Sub
End Class
-OUTPUT:
[Link] VALIDATION WITH APPLICATION VARIABLE

-DESIGN CODE:

<%@ Page Title="Home
Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true" CodeBehind="[Link]
[Link]" Inherits="login_control._Default" %>
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
 
    <div class="jumbotron">
        <h1>
            <asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPad
ding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-
Size="0.8em" ForeColor="#333333" Height="504px" Width="747px">
                <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
                <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" Borde
rWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" />
                <TextBoxStyle Font-Size="0.8em" />
                <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font
Size="0.9em" ForeColor="White" />
            </asp:Login>
        </h1>
    </div>
</asp:Content>
 

 
-SOURCE CODE:

Public Class _Default
        Inherits [Link]
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As [Link]) Handles [Link]
            Application("i") = Int(Application("i") + 1)
            If Application("i") > 4 Then
                Application("i") = 0
            End If
        End Sub
    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As [Link]
thenticateEventArgs) Handles [Link]
        If [Link] = "keerthana" And [Link] = "bca" Then
            MsgBox("your are successfully logged i")
        End If
        If (Application("i") = 4) Then
                MsgBox("you are blocked")
                [Link] = False
            End If
        End Sub
-OUTPUT:
[Link] MANAGEMENT TECHNIQUE USING APPLICATION AND SESSION

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="html._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<p>
<asp:Login ID="Login1" runat="server" Height="152px" Width="320px">
<HyperLinkStyle HorizontalAlign="Center" />
<InstructionTextStyle HorizontalAlign="Center" />
<LabelStyle HorizontalAlign="Center" />
</asp:Login>
<p style="color: #000099">
<asp:Label ID="Label3" runat="server" Text="THE SOCIALS" Font-Names="Algerian" Font-
Underline="True" style="font-size: 40pt"></asp:Label>
<p style="color: #0066CC; font-family: 'Lucida Sans Unicode'">
<asp:Image ID="Image2" runat="server" Height="162px" ImageUrl="~/[Link]" Width="252px" />
<asp:Image ID="Image3" runat="server" Height="156px" ImageUrl="~/[Link]" Width="272px" />
<asp:Image ID="Image4" runat="server" Height="152px" ImageUrl="~/[Link]" Width="294px" />
<p>

<ol style="font-family: 'Lucida Sans',Verdana, sans-serif">


<li><span style="color: #000099; font-family: 'Bahnschrift SemiLight';"><span style="font-size:
15pt">&nbsp;Sandwiches </li>
</span>
<ul>
<li>Russian Mayo </li>
<li>Tandoori Paneer</li>
<li>Triple Barbequed Kheema </li>
<li style="height: 21px; width: 688px">Hot and Spicy Chicken FiestA</li>
</ul>

<li ><span style="color: #000099; font-family: 'Bahnschrift SemiLight';">&nbsp;<span style="font-size:


14pt">Pasta</span> </li>
</span>
<ul>
<li>Italian Olive</li>
<li>Mac And Cheese</li>
<li>Aglio Oglio</li>
<p>COMBOS</p>
<ul>
<li>Spring Raineese</li>
<li>LasangaSpaggheti </li>
<li>DipTomsShrimp Trynia</li>
</ul>
</ul>
<li><span style="color: #000099; font-family: 'Bahnschrift SemiLight'; font-size: 13pt;">&nbsp;
Pizza</span><ul>
<li>Chicken Dominator</li>
<li>4 Cheese Margherita</li>
<li>Pepperoni Combo</li>
<li>BBQ Corn&#39;n&#39;Spice</li>
</ul>
<li><span style="color: #000099; font-family: 'Bahnschrift SemiLight';">&nbsp; <span style="font-size:
13pt">Beverages and Deserts</b> </li>
<ul>
<li>Pepsi </li>
<li>Mountain Dew </li>
<ul>
<li>Mousse Cake</li>
<LI>Vanilla Spin</LI>
<li>Chocolate Truffle</li>
</ul>
</ul>
</ol>
<dl> <dt><b> ******</b></dt>
<dd style="color: #FF3300"> Special Offers starting from 1Nov till 4 Nov </dd>
<dt><b>TRYNEW </b></dt>
<dd style="color: #FF0066"> Use this exclusive coupon to get 50%off, validity ends at 11:59pm
tonight</dd>
</dl>
<asp:Image ID="Image6" runat="server" Height="199px" ImageUrl="~/[Link]"
Width="263px" />
<asp:Image ID="Image7" runat="server" Height="190px" ImageUrl="~/[Link]" Width="269px" />
&nbsp;<asp:Label ID="Label4" runat="server" Text="REACH US :" Font-Names="Felix Titling" Font-
Underline="True"></asp:Label>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</asp:Content>
-SOURCE CODE:

Imports [Link]

Public Class Global_asax


Inherits HttpApplication

Sub Application_Start(sender As Object, e As EventArgs)


' Fires when the application is started
[Link]([Link])
[Link]([Link])

Application("visits") = 0
End Sub
Sub Session_Start(sender As Object, e As EventArgs)
Session("my_text") = "USER"
End Sub

End Class

Public Class _Default


Inherits Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles [Link]

Application("visits") = Application("visits") + 1
[Link] = Application("visits")

End Sub

Protected Sub Login1_Authenticate(sender As Object, e As AuthenticateEventArgs) Handles


[Link]
If [Link] = "Rebecca" And [Link] = "rebe" Then
MsgBox("login successful")
[Link] = False
[Link]("uname", [Link])
Dim uname As String
uname = ViewState("uname").ToString

[Link] = "Welcome " + uname + ", what is your order today ? "
End If
End Sub
End Class
-OUTPUT:
[Link] DATABASE CONNECTION

-DESIGN CODE:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/[Link]" AutoEventWireup="true"


CodeBehind="[Link]" Inherits="WebApplication10._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<p>
<asp:Label ID="Label1" runat="server" Font-Names="Algerian" Font-Size="XX-Large" Font-
Underline="True" style="font-size: 23pt" Text="ANNUAL STUDENT RECORD-BCA"></asp:Label>
<asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#999999"
BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical"
Height="314px" Width="650px" CellSpacing="3" HorizontalAlign="Center">
<AlternatingRowStyle BackColor="#CCCCCC" />
<EditRowStyle BorderStyle="Dotted" HorizontalAlign="Center" />
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<RowStyle HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White"
HorizontalAlign="Center" />
<SortedAscendingCellStyle BackColor="#F1F1F1" HorizontalAlign="Center" />
<SortedAscendingHeaderStyle BackColor="#808080" BorderStyle="Solid" HorizontalAlign="Center" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />
</asp:GridView>
</p>
<p><asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/[Link]"></asp:XmlDataSource></p>

</asp:Content>
-SOURCE CODE:

Imports [Link]
Public Class _Default
Inherits Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles [Link]


Dim data As New DataSet
[Link](MapPath("[Link]"))
[Link] = data
[Link]()
End Sub
End Class

XML FILE
<?xml version="1.0" encoding="utf-8" ?>
<Students>
<stud>
<RollNo > 400243 </RollNo>
<StudName > Tara </StudName>
<[Link] > 92 </[Link]>
<Python > 87 </Python>
<PHP > 80 </PHP>
<BatchNo. >2 </BatchNo.>
<Result >Pass </Result>
<Yop >2021 </Yop>
</stud>

<stud>
<RollNo> 400241 </RollNo>
<StudName> Payal </StudName>
<[Link]> 29 </[Link]>
<Python> 30</Python>
<PHP> 33 </PHP>
<BatchNo.>1</BatchNo.>
<Result>Fail</Result>
<Yop>2021</Yop>
</stud>

<stud>
<RollNo> 400244 </RollNo>
<StudName> Kriti </StudName>
<[Link]> 98 </[Link]>
<Python> 99 </Python>
<PHP> 100 </PHP>
<BatchNo.>1</BatchNo.>
<Result>Pass</Result>
<Yop>2021</Yop>
</stud>
<stud>
<RollNo> 400248 </RollNo>
<StudName> Yash </StudName>
<[Link]> 35 </[Link]>
<Python> 35 </Python>
<PHP> 33 </PHP>
<BatchNo.>2</BatchNo.>
<Result>Fail</Result>
<Yop>2021</Yop>
</stud>

<stud>
<RollNo> 400247 </RollNo>
<StudName> Rahul </StudName>
<[Link]> 80 </[Link]>
<Python> 90 </Python>
<PHP> 70 </PHP>
<BatchNo.>1</BatchNo.>
<Result>Pass</Result>
<Yop>2021</Yop>
</stud>

<stud>
<RollNo> 400249 </RollNo>
<StudName> Smritika </StudName>
<[Link]> 78 </[Link]>
<Python> 65 </Python>
<PHP> 91 </PHP>
<BatchNo.>2</BatchNo.>
<Result>Pass</Result>
<Yop>2021</Yop>
</stud>

</Students>
OUTPUT:

You might also like