0% found this document useful (0 votes)
111 views93 pages

NET Lab Manual

This file has Basic .Net Lab Manual. This Manual has been useful for UG,PG Computer Science, IT, BCA, MCA Students

Uploaded by

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

NET Lab Manual

This file has Basic .Net Lab Manual. This Manual has been useful for UG,PG Computer Science, IT, BCA, MCA Students

Uploaded by

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

Ex.

no:1

Date: Factorial number

Aim:
To write a program for factorial number in [Link] using windows
form application.

Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->
New Project->Visual C#->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

1
Form design:

CONTROLS CAPTION NAME


LABEL 1 FACTORIAL LABEL 1
NUMBER
LABEL2 ENTER THE LABEL 2
NUMBER
LABEL 3 RESULT LABEL 3
LABEL 4 LABEL 4 LABEL 4
TEXTBOX1 _ TEXTBOX1
BUTTON1 GENERATE FACT

2
Source code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As [Link], ByVal e
As [Link]) Handles [Link]
[Link] = fact(Val([Link]))
End Sub
Function fact(ByVal a As Integer) As Long
Dim K As Integer
fact = 1
For k = a To 1 Step -1
fact *= k
Next
End Function
End Class

3
Output:

Result:
Thus the program has been executed successfully.

4
[Link]

Date: Biggest and smallest number

Aim:
To write a program for finding the biggest and smallest of three
numbers in [Link] using windows form application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

5
Form design:

controls Caption Name


Label1 Biggest and small Label1
Label2 First number Label2
Label3 Second number Label3
Label4 Third number Label4
Label5 Biggest number Label5
Label6 Smallest number Label6
Label7 Label 7 Label7
Label 8 Label 8 Label 8
Button1 Compare Button1

6
Source code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As [Link], ByVal e
As [Link]) Handles [Link]
Dim f As Integer
Dim s As Integer
Dim t As Integer
Dim sma As Integer
Dim lar As Integer
f = Val([Link])
s = Val([Link])
t = Val([Link])
If f > s Then
lar = f
Else
lar = s
End If
If lar < t Then
lar = t
End If
If lar < s Then
sma = f
Else
sma = s
End If
If sma > t Then
sma = t
End If
[Link] = lar
[Link] = sma
End Sub
End Class

7
Output:

Result:
Thus the program has been executed successfully.

8
[Link]

Date: Display message using rich text box

Aim:
To write a program for displaying the message in rich text box in
[Link] using windows form application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Windows
->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

9
Form design:

CONTROLS CAPTION NAME


LABEL 1 DISPLAY THE LABEL 1
MESSAGE
LABEL 2 NAME LABEL 2
LABEL3 ADDRESS LABEL3
LABEL4 DISPLAY LABEL4
RICHTEXTBOX1 _ RICHTEXTBOX1
TEXTBOX1 _ TEXTBOX1
TEXTBOX2 _ TEXTBOX2
BUTTON1 DISPLAY BUTTON1
BUTTON2 CLEAR BUTTON2
BUTTON3 EXIT BUTTON3

10
Source code:
Public Class Form1

Private Sub Button1_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link] = [Link] & "," & [Link]
End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link]()
[Link]()
[Link]()
End Sub

Private Sub Button3_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link]()
End Sub
End Class

11
Output:

Result:
Thus the program has been executed successfully.

12
[Link]

Date: Adding two number

Aim:
To write a program for adding two numbers in [Link] using windows
form application.
Algorithm:

1. Start the program


2. Open ->Visual Studio 2008->File->New Project->Visual C#-
>Console Application.
3. Write the coding in source code page.
4. Save the program.
5. Run the program.
6. Stop the program.

13
Form design:

CONTROLS CAPTION NAME


LABEL 1 MARK1 LABEL 1
LABEL 2 MARK2 LABEL 2
LABEL3 RESULT LABEL3
TEXTBOX1 _ TEXTBOX1
TEXTBOX2 _ TEXTBOX2
TEXTBOX3 _ TEXTBOX3
BUTTON1 ADD BUTTON1
BUTTON2 CLEAR BUTTON2

14
Source code:
Public Class Form1

Private Sub Button1_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link] = Val([Link]) + Val([Link])
End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link] = " "
[Link] = " "
[Link] = " "
End Sub
End Class

15
Output:

Result:
Thus the program has been executed successfully.

16
[Link]

Date: Image blink

Aim:
To write a program for image blink in [Link] using windows form
application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#
->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

17
Form design:

CONTROLS CAPTION NAME


Image box - Image1
button Blink Button1
Timer - Timer1

18
Source code:
Public Class Form1

Private Sub Button1_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link] = True
End Sub

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link] = [Link] + 1
If [Link] Mod 2 = 0 Then
[Link]("C:\Users\Lab-II\Pictures\[Link]")
Else
[Link]("C:\Users\Lab-II\Pictures\[Link]")
End If
End Sub
End Class

19
Output:

Result:
Thus the program has been executed successfully.

20
[Link]

Date: Stop clock

Aim:
To write a program for stop clock in [Link] using windows form
application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual C#-
>windows from Application.
3. Write the coding in source code page.
4. Save the program.
5. Run the program.
6. Stop the program.

21
Form design:

CONTROLS CAPTION NAME


BUTTON START Button1
TIMER 30 Timer1

22
Source code:
Public Class Form1

Private Sub Button1_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] = True Then
[Link]()
Else
[Link] = 25
[Link]()
End If
End Sub

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link]()
[Link] = 1000
[Link] = [Link]
If [Link] = 10 Then
[Link] = [Link]
[Link] = Val([Link]) - 1
ElseIf [Link] = 0 Then
[Link] = False
MsgBox("times up!!!")
Else
[Link] = Val([Link]) - 1
End If
End Sub
End Class

23
Output:

Result:
Thus the program has been executed successfully.

24
[Link]

Date: Progress bar

Aim:
To write a program for progress bar in [Link] using windows Form
application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual C#
->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

25
Form design:

CONTROLS CAPTION NAME


LABEL LOADING LABEL1
PROGRESS BAR - PROGRESS BAR1
TIMER 0 TIMER1

26
Source code:
Public Class Form1

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
[Link](2)
[Link] = (100)
[Link] = 0
[Link] = [Link] & "%"
If [Link] = 100 Then
[Link]()

End If

End Sub

Private Sub ProgressBar1_Click(ByVal sender As [Link],


ByVal e As [Link]) Handles [Link]
[Link]()

End Sub
End Class

27
Output:

Result:
Thus the program has been executed successfully.

28
[Link]

Date: Day, month & year calculation using


Birthday

Aim:
To write a program for birthday difference in [Link] using windows
Form application
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual C#
->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

29
Form design:

CONTROLS CONTENT NAME

LABEL1 Enter your date of LABEL1


birth
TEXTBOX1 - TEXTBOX1
BUTTON SOLVE BUTTON1
LABEL2 Birthday difference LABEL4
LABEL3 Your year is LABEL5
LABEL4 Your month are LABEL4
LABEL5 Your days are LABEL5

LABEL6 You born on LABEL6


TEXTBOX1 - TEXTBOX1
TEXTBOX2 - TEXTBOX2
TEXTBOX3 - TEXTBOX3
TEXTBOX4 - TEXTBOX4

30
Source code:
Public Class form1
Private Sub Button1_Click(ByVal sender As [Link], ByVal e
As [Link]) Handles [Link]
Dim dob As Date = Format(CDate([Link]), "dd/MM/yyyy")
[Link] = DateDiff([Link], dob, Now)
[Link] = DateDiff([Link], dob, Now)
[Link] = DateDiff([Link], dob, Now)
[Link] = WeekdayName([Link], False,
[Link])
End Sub
End Class

31
Output:

Result:
Thus the program has been executed successfully.

32
[Link]

Date: calculator

Aim:
To write a program for calculating tax in [Link] using windows form
application.
ALGORITHM:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#
->Windows Form Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

33
Form design:

controls content Name


TEXTBOX1 - TEXTBOX1
BUTTON1 1 BUTTON1
BUTTON2 2 BUTTON2
BUTTON3 3 BUTTON3
BUTTON4 4 BUTTON4
BUTTON5 5 BUTTON5
BUTTON6 6 BUTTON6
BUTTON7 7 BUTTON7
BUTTON8 8 BUTTON8
BUTTON9 9 BUTTON9
BUTTON10 . BUTTON10
BUTTON11 0 BUTTON11
BUTTON12 C BUTTON12
BUTTON13 + BUTTON13
BUTTON14 - BUTTON14
BUTTON15 * BUTTON15
BUTTON16 / BUTTON16
BUTTON17 = BUTTON17

34
Source code:
Public Class Form1
Dim fnum As Decimal
Dim snum As Decimal
Dim operation As Integer
Dim oper_select As Boolean = False

Private Sub Button1_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "1"
Else
[Link] = "1"
End If
End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "2"
Else
[Link] = "2"
End If
End Sub

Private Sub Button3_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "3"
Else
[Link] = "3"
End If
End Sub

Private Sub Button4_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
35
[Link] += "4"
Else
[Link] = "4"
End If
End Sub

Private Sub Button5_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "5"
Else
[Link] = "5"
End If
End Sub

Private Sub Button6_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "6"
Else
[Link] = "6"
End If
End Sub

Private Sub Button7_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "7"
Else
[Link] = "7"
End If
End Sub

Private Sub Button8_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "8"
Else
36
[Link] = "8"
End If
End Sub

Private Sub Button9_Click(ByVal sender As [Link], ByVal e


As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "9"
Else
[Link] = "9"
End If
End Sub

Private Sub Button10_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
If [Link] <> "0" Then
[Link] += "0"
Else
[Link] = "0"
End If
End Sub

Private Sub Button13_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
fnum = [Link]
[Link] = "0"
oper_select = True
operation = 1
End Sub

Private Sub Button14_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
fnum = [Link]
[Link] = "0"
oper_select = True
operation = 2
End Sub

37
Private Sub Button15_Click(ByVal sender As [Link], ByVal
e As [Link]) Handles [Link]
fnum = [Link]
[Link] = "0"
oper_select = True
operation = 3
End Sub

Private Sub Button16_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
fnum = [Link]
[Link] = "0"
oper_select = True
operation = 4
End Sub

Private Sub Button11_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
If Not ([Link](".")) Then
[Link] += "."
End If
End Sub

Private Sub Button12_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
[Link] = "0"
End Sub

Private Sub Button17_Click(ByVal sender As [Link], ByVal


e As [Link]) Handles [Link]
If oper_select = True Then
snum = [Link]
End If
If operation = 1 Then
[Link] = fnum + snum
ElseIf operation = 2 Then

38
[Link] = fnum - snum
ElseIf operation = 3 Then
[Link] = fnum * snum
Else
If snum = 0 Then
[Link] = "error!"
Else
[Link] = fnum / snum
End If
If oper_select = False Then
End If
End If
End Sub
End Class

39
Output:

Result:
Thus the program has been executed successfully.

40
[Link]

Date: Structure using Console application

Aim:
To write a program for structure using console application in [Link].
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Console Application.
3. Write the coding in source code page.
4. Save the program.
5. Run the program.
6. Stop the program.

41
Source code:
Module Module1
Public Enum Gender
Male = 1
female = 2
End Enum
Public Structure customer
Dim firstname As String
Dim lastname As String
Dim Gender As Gender
Dim fuladdress As Address
Dim cellphone As String
Dim email As String
End Structure
Public Structure address
Dim Streetaddress As String
Dim city As String
Dim state As String
Dim zip As String
End Structure
Sub Main()
Dim objcustomer As customer
With objcustomer
.firstname = "Suba"
.lastname = "mass"
.Gender = [Link]
.cellphone = "9488120431"
.email = "suba0305@[Link]"
With .fuladdress
.Streetaddress = "surulipatti southstreet"
.city = "cumbum"
.state = "tamilnadu"
.zip = "00006"
End With
End With
[Link]("the customer name:" & [Link] &
"" & [Link] & vbCrLf & [Link] &

42
"address:" & [Link] &
[Link] & "," & [Link] &
"," & [Link])
[Link]()
End Sub

End Module

43
Output:

Result:
Thus the program has been executed successfully.

44
[Link] using c#

45
[Link]

Date: Login validation

Aim:
To write a program for finding in [Link] using Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual C#-
>Web
->[Link] Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

46
Form design:

47
CONTROLS CAPTION NAME Field validator
LABEL1 LOGIN LABEL1 _
FORM
VALIDATI
ON
LABEL2 USER LABEL2 REQUIRED FIELD
NAME VALIDATOR
LABEL3 EMAIL LABEL3 REGULAR
EXPRESSION
VALIDATOR
LABEL4 PASSWOR LABEL4 REQUIRED FIELD
D VALIDATOR
LABEL5 CONFIRM LABEL5 REQUIRED FIELD
PASSWOR VALIDATOR AND
D COMPARE
VALIDATOR
LABEL6 COUNTRY LABEL6 REQUIRED
VALIDATOR
TEXTBOX1 _ TEXTBOX1 _
TEXTBOX2 _ TEXTBOX2 _
TEXTBOX3 _ TEXTBOX3 _
TEXTBOX4 _ TEXTBOX4 _
DROPDOW _ DROPDOW _
NBOX1 NBOX1
BUTTON1 SUBMIT BUTTON1 _

48
Source code:
Partial Class _Default
Inherits [Link]

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


[Link]) Handles [Link]
[Link]("login is successful")
End Sub
End Class

49
Output:

Result:
Thus the program has been executed successfully.

50
[Link]

Date: Advertisement using Ad rotator

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

51
Source code:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad>
<ImageUrl>[Link]</ImageUrl>
<AlternateText>Invalid</AlternateText>
<NavigateUrl></NavigateUrl>
</Ad>
<Ad>
<ImageUrl>[Link]</ImageUrl>
<AlternateText>Invalid</AlternateText>
<NavigateUrl></NavigateUrl>
</Ad>
</Advertisements>

52
Output:

Result:
Thus the program has been executed successfully.

53
[Link]

Date: hotspot
Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program

[Link] ->Visual Studio 2008->File->New Project->Visual c#->Web-


>Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

54
Form design:

controls caption name


IMAGE MAP1 _ IMAGEMAP1
LABEL1 _ LABEL1

55
Source code:
Partial Class _Default
Inherits [Link]

Protected Sub ImageMap1_Click(ByVal sender As Object, ByVal e


As [Link]) Handles
[Link]
[Link] = [Link]([Link]) + " Hotspot is
clicked "
End Sub
End Class

56
Output:

Result:
Thus the program has been executed successfully.

57
[Link]

Date: Moving a car

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

58
Source code:
Public Class Form1
Dim speed As Integer
Dim road(7) As PictureBox
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
[Link]
speed = 3
road(0) = PictureBox1
road(1) = PictureBox2
road(2) = PictureBox3
road(3) = PictureBox4
road(4) = PictureBox5
road(5) = PictureBox6
road(6) = PictureBox7
road(7) = PictureBox8
End Sub
Private Sub Timer9_Tick(sender As Object, e As EventArgs)
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles
[Link]
For x As Integer = 0 To 7
road(x).Top += 2
If road(x).Top >= [Link] Then
road(x).Top = -road(x).Height
End If

59
Next
End Sub
Private Sub PictureBox9_Click(sender As Object, e As EventArgs)
End Sub
End Sub
Private Sub left_mover_Tick(sender As Object, e As EventArgs)
Handles left_mover.Tick
If ([Link].X > 0) Then
[Link] -= 5
End If
End Sub
Private Sub right_mover_Tick(sender As Object, e As EventArgs)
Handles right_mover.Tick
If ([Link].X < 190) Then
[Link] += 5
End If
End Sub
End Sub
Private Sub Enemy1_mover_Tick(sender As Object, e As EventArgs)
Handles Enemy1_mover.Tick
[Link] += 2
If [Link] >= [Link] Then
[Link] = -[Link]
End If
End Sub

60
Private Sub Enemy2_mover_Tick(sender As Object, e As EventArgs)
Handles Enemy2_mover.Tick
[Link] += 3
End Sub
Private Sub Enemy3_mover_Tick(sender As Object, e As EventArgs)
Handles Enemy3_mover.Tick
[Link] += 2.5
End Sub

61
Output:

Result:
Thus the program has been executed successfully.

62
[Link]

Date: Cookies

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

63
Form design:

CONTROLS CAPTION NAME


TEXTBOX1 _ TEXTBOX1
TEXTBOX2 _ TEXTBOX2
BUTTON1 SET COOKIES BUTTON1
BUTTON2 GET COOKIES BUTTON2
LABEL1 _ LABEL1

64
Source code:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

namespace WebApplication2
{
public partial class _Default : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
[Link]["uname"].Value = [Link];
[Link]["pass"].Value = [Link];
[Link]["uname"].Expires = [Link](2);
[Link]["pass"].Expires = [Link](2);
}

protected void Button2_Click(object sender, EventArgs e)


{
[Link] = [Link]["uname"].[Link]() + "
second cookies is " + [Link]["pass"].[Link]();
}
}
}
65
Output:

Result:
Thus the program has been executed successfully.

66
[Link]

Date: Banking application

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

67
Form design:

68
Source code:
Bank home master
<%@ Master Language="C#" AutoEventWireup="true"
CodeBehind="[Link]" Inherits="bankapp.bankhome1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"[Link]

<html xmlns="[Link] >


<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<div align="center">
<h1>
Bank application
</h1>
<asp:hyperlink runat="server" NavigateUrl="~/New [Link]">New Bank
Entry</asp:hyperlink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:hyperlink runat="server" NavigateUrl="~/New [Link]">New Branch
Entry</asp:hyperlink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;
<asp:hyperlink runat="server" NavigateUrl="~/New [Link]">New
Customer Entry</asp:hyperlink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:hyperlink runat="server" NavigateUrl="~/Generate
[Link]">Generate Report</asp:hyperlink>
</div>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

69
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

Bank start page


<%@ Page Language="C#" MasterPageFile="~/[Link]"
AutoEventWireup="true" CodeBehind="[Link]"
Inherits="[Link]" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">

<h1 align="center">
Welcome To Bank..........
</h1>
</asp:Content>

New branch
<%@ Page Language="C#" MasterPageFile="~/[Link]"
AutoEventWireup="true" CodeBehind="New [Link]"
Inherits="bankapp.WebForm2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<br /><br /><br /><br /><br /><br /><br /><br />
New Branch Content goes here.........
<br /><br /><br /><br /><br /><br /><br /><br />
</asp:Content>

New customer
<%@ Page Language="C#" MasterPageFile="~/[Link]"
AutoEventWireup="true" CodeBehind="New [Link]"
Inherits="bankapp.WebForm3" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

70
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<br /><br /><br /><br /><br /><br /><br /><br />
New Customer Content goes here.........
<br /><br /><br /><br /><br /><br /><br /><br />
</asp:Content>

Generate report
<%@ Page Language="C#" MasterPageFile="~/[Link]"
AutoEventWireup="true" CodeBehind="Generate [Link]"
Inherits="bankapp.WebForm4" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<br /><br /><br /><br /><br /><br /><br /><br />
New Branch Content goes here.........
<br /><br /><br /><br /><br /><br /><br /><br />
</asp:Content>

71
Output:

Result:
Thus the program has been executed successfully

72
[Link]

Date: DISPLAY THE ADDRESS

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

73
FORM DESIGN:

CONTROLS CONTENT NAME

LABEL1 CALCULATING LABEL1


TAX
LABEL2 ENTER QUALITY LABEL2
LABEL3 SUBTOTAL LABEL3
LABEL4 TAX LABEL4
LIST BOX MR/MRS
TEXTBOX1 _ TEXTBOX1
TEXTBOX2 _ TEXTBOX2

TEXTBOX3 _ TEXTBOX3
DROPDOWN THENI
LIST BOX
BUTTON1 TOTAL BUTTON1
LABEL5 - LABEL5
LABEL6 - LABEL6
LABEL7 - LABEL7
LABEL8 - LABEL8

74
SOURCE CODE:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

namespace address
{
public partial class _Default : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
[Link] = [Link];
[Link] = [Link] + "" + [Link];
[Link] = [Link];
[Link] = [Link];
}
}
}

75
Output:

Result:
Thus the program has been executed successfully

76
[Link]

Date: Image slider

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

77
FORM DESIGN:

controls caption name


IMAGE1 _ IMAGE1
IMAGE2 _ IMAGE2
IMAGE3 _ IMAGE3
BUTTON1 << BUTTON1
BUTTON2 >> BUTTON2
LABEL1 IMAGE SLIDER LABEL1

78
SOURCE CODE:
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="[Link]" Inherits="WebApplication4._Default"
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN" "[Link]
[Link]">

<html xmlns="[Link] >


<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:ImageButton ID="ImageButton1" runat="server"


Height="258px" Width="252px"
ImageUrl="~/[Link]" />
<asp:ImageButton ID="ImageButton2" runat="server"
Width="189px" ImageUrl="~/[Link]"/>
<asp:ImageButton ID="ImageButton3" runat="server"
Width="231px" ImageUrl="~/[Link]" />

<br />
<asp:Button ID="Button1" runat="server" Text="&lt;&lt;"
onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
Text="&gt;&gt;" />

</div>
</form>
</body>
</html>

79
View code:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

public partial class _Default : [Link]


{

protected void Button1_Click(object sender, EventArgs e)


{
string Url = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = Url;
}
protected void Button2_Click(object sender, EventArgs e)
{
string Url = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = Url;
}}

80
Output:

Result:
Thus the program has been executed successfully.

81
[Link]

Date: sessions

Aim:
To write a program for creating sessions using [Link] Web
application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

82
Form design:

83
Source code:
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

namespace sse
{
public partial class _Default : [Link]
{
protected void Button1_Click(object sender, EventArgs e)
{
Session["Some Data"] = [Link];
}

protected void Button2_Click(object sender, EventArgs e)


{
[Link] = Session["Some Data"].ToString();
}
}
}

using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
84
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
namespace sse
{
public partial class WebForm1 : [Link]
{
protected void Button1_Click(object sender, EventArgs e)
{
[Link] = Session["Some Data"].ToString();
}
}
}

85
Output:

Result:
Thus the program has been executed successfully.

86
[Link]

Date: Grid view control using access for


student details

Aim:
To write a program for finding in [Link] using Visual c# in [Link]
Web application.
Algorithm:
1. Start the program
2. Open ->Visual Studio 2008->File->New Project->Visual c#-
>Web->Web Application
3. Design the page with controls as per table.
4. Write the coding in source code page.
5. Save the program.
6. Run the program.
7. Stop the program.

87
Form design:

88
design code:
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="[Link]"
Inherits="WebApplication32._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN" "[Link]
[Link]">

<html xmlns="[Link] >


<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:GridView ID="GridView1" runat="server"


AutoGenerateColumns="False"
DataKeyNames="ID" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID"
InsertVisible="False"
ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="S NO" HeaderText="S NO"
SortExpression="S NO" />
<asp:BoundField DataField="REGISTTER NUMBER"
HeaderText="REGISTTER NUMBER"
SortExpression="REGISTTER NUMBER" />
<asp:BoundField DataField="STUDENT NAME"
HeaderText="STUDENT NAME"
SortExpression="STUDENT NAME" />
<asp:BoundField DataField="AGE" HeaderText="AGE"
SortExpression="AGE" />
</Columns>
</asp:GridView>
<br />
89
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [STUDENT] WHERE [ID] = ?
AND (([S NO] = ?) OR ([S NO] IS NULL AND ? IS NULL)) AND
(([REGISTTER NUMBER] = ?) OR ([REGISTTER NUMBER] IS
NULL AND ? IS NULL)) AND (([STUDENT NAME] = ?) OR
([STUDENT NAME] IS NULL AND ? IS NULL)) AND (([AGE] =
?) OR ([AGE] IS NULL AND ? IS NULL))"
InsertCommand="INSERT INTO [STUDENT] ([ID], [S NO],
[REGISTTER NUMBER], [STUDENT NAME], [AGE]) VALUES
(?, ?, ?, ?, ?)"
OldValuesParameterFormatString="original_{0}"
ProviderName="<%$
ConnectionStrings:[Link] %>"
SelectCommand="SELECT * FROM [STUDENT]"
UpdateCommand="UPDATE [STUDENT] SET [S NO] = ?,
[REGISTTER NUMBER] = ?, [STUDENT NAME] = ?, [AGE] = ?
WHERE [ID] = ? AND (([S NO] = ?) OR ([S NO] IS NULL AND ?
IS NULL)) AND (([REGISTTER NUMBER] = ?) OR ([REGISTTER
NUMBER] IS NULL AND ? IS NULL)) AND (([STUDENT
NAME] = ?) OR ([STUDENT NAME] IS NULL AND ? IS NULL))
AND (([AGE] = ?) OR ([AGE] IS NULL AND ? IS NULL))">
<DeleteParameters>
<asp:Parameter Name="original_ID" Type="Int32" />
<asp:Parameter Name="original_S_NO" Type="String" />
<asp:Parameter Name="original_REGISTTER_NUMBER"
Type="String" />
<asp:Parameter Name="original_STUDENT_NAME" Type="String"
/>
<asp:Parameter Name="original_AGE" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="S_NO" Type="String" />
<asp:Parameter Name="REGISTTER_NUMBER" Type="String" />
<asp:Parameter Name="STUDENT_NAME" Type="String" />

90
<asp:Parameter Name="AGE" Type="String" />
<asp:Parameter Name="original_ID" Type="Int32" />
<asp:Parameter Name="original_S_NO" Type="String" />
<asp:Parameter Name="original_REGISTTER_NUMBER"
Type="String" />
<asp:Parameter Name="original_STUDENT_NAME" Type="String"
/>
<asp:Parameter Name="original_AGE" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="S_NO" Type="String" />
<asp:Parameter Name="REGISTTER_NUMBER" Type="String" />
<asp:Parameter Name="STUDENT_NAME" Type="String" />
<asp:Parameter Name="AGE" Type="String" />
</InsertParameters>
</asp:SqlDataSource>

</div>
</form>
</body>
</html>

91
OUTPUT:

Result :
Thus the program has been executed successfully.

92

You might also like