Final
Final
Roll No:-26
1
Name:-Ravi Singh
Roll No:-26
Login Page
Input :-
Login.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
<br />
<br />
2
Name:-Ravi Singh
Roll No:-26
<br />
<br />
NavigateUrl="~/reg.aspx">registration</asp:HyperLink>
<br />
<br />
</div>
</form>
</body>
</html>
Login.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
str = "select count(*) from reg where username='" & TextBox1.Text & "' and pass='" &
TextBox2.Text & "' "
cnn.Open()
3
Name:-Ravi Singh
Roll No:-26
str1 = cmd.ExecuteScalar
cnn.Close()
Response.Redirect("showall.aspx")
Else
End If
End Sub
End Class
Output:-
Registration page
4
Name:-Ravi Singh
Roll No:-26
Input:-
Registration.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
<br />
<br />
<br />
<br />
<br />
<br />
5
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
<br />
<br />
</div>
</form>
</body>
</html>
Registration.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
6
Name:-Ravi Singh
Roll No:-26
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
MsgBox("registration complete")
Response.Redirect("login.aspx")
End If
End Sub
End Class
Output:-
Master Page
Input:-
Masterpage.master
7
Name:-Ravi Singh
Roll No:-26
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
width: 1000px;
border-style: solid;
border-width: 2px;
.style2
height: 49px;
.style3
width: 1000px;
.style4
width: 245px;
</style>
</head>
<body>
8
Name:-Ravi Singh
Roll No:-26
<div>
<tr>
<td class="style2">
</h1>
</td>
</tr>
<tr>
<td>
<tr>
Font-Underline="False">Add Book</asp:HyperLink>
</td>
Font-Underline="False">Update Book</asp:HyperLink>
</td>
Font-Underline="False">Delete Book</asp:HyperLink>
</td>
9
Name:-Ravi Singh
Roll No:-26
Font-Underline="False">Search Book</asp:HyperLink>
</td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="style3">
<tr>
<td class="style4">
Font-Underline="False">Add Book</asp:HyperLink>
<br />
<br />
<br />
<br />
Font-Underline="False">Update Book</asp:HyperLink>
<br />
<br />
<br />
<br />
10
Name:-Ravi Singh
Roll No:-26
Font-Underline="False">Delete Book</asp:HyperLink>
<br />
<br />
<br />
<br />
Font-Underline="False">Search Book</asp:HyperLink>
<br />
<br />
<br />
<br />
<br />
</td>
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<p align="right"
11
Name:-Ravi Singh
Roll No:-26
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Output:-
Add Book
Input:-
Add Book.aspx
12
Name:-Ravi Singh
Roll No:-26
</asp:Content>
<p>
Height="53px" Width="612px"></asp:TextBox>
</p>
<p>
Height="42px" Width="636px"></asp:TextBox>
</p>
<p>
Height="42px" Width="632px"></asp:TextBox>
</p>
<p>
Height="40px" Width="634px"></asp:TextBox>
<br />
</p>
13
Name:-Ravi Singh
Roll No:-26
<p>
Height="48px" Width="635px"></asp:TextBox>
</p>
<p>
</p>
</asp:Content>
Add Book.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
Response.Redirect("showall.aspx")
End If
End Sub
14
Name:-Ravi Singh
Roll No:-26
End Class
Output:-
Update Book
Input:-
Update.aspx
</asp:Content>
15
Name:-Ravi Singh
Roll No:-26
<p>
</p>
<p>
</asp:DropDownList>
</p>
<p>
</p>
<p>
Height="42px" Width="636px"></asp:TextBox>
</p>
<p>
Height="42px" Width="632px"></asp:TextBox>
</p>
<p>
Height="40px" Width="634px"></asp:TextBox>
<br />
16
Name:-Ravi Singh
Roll No:-26
</p>
<p>
Height="48px" Width="635px"></asp:TextBox>
</p>
<p>
</p>
</asp:Content>
Update.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
17
Name:-Ravi Singh
Roll No:-26
cnn.Close()
End Sub
str = "update table1 set author='" & TextBox3.Text & "',no_of_book='" & TextBox4.Text &
"',price='" & TextBox5.Text & "',title='" & TextBox6.Text & "' where isbn_no='" &
DropDownList1.SelectedValue & "'"
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
Response.Redirect("showall.aspx")
End If
End Sub
End Class
Output:-
Delete Book
18
Name:-Ravi Singh
Roll No:-26
Input:-
Delete.aspx
</asp:Content>
<br />
<br />
</asp:DropDownList>
<br />
<br />
<br />
</asp:Content>
Delete.aspx.vb
Imports System.Data.SqlClient
19
Name:-Ravi Singh
Roll No:-26
Inherits System.Web.UI.Page
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
str = "delete from table1 where title='" & DropDownList1.SelectedValue & "'"
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
Response.Redirect("showall.aspx")
End If
End Sub
End Class
20
Name:-Ravi Singh
Roll No:-26
Output:-
Search Book
Input:-
Srchbook.aspx
</asp:Content>
21
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
<br />
</asp:GridView>
<br />
</asp:Content>
22
Name:-Ravi Singh
Roll No:-26
Srchbook.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
str = "select * from table1 where title ='" & TextBox1.Text & "'"
da.Fill(ds)
cnn.Open()
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
23
Name:-Ravi Singh
Roll No:-26
Input:-
Showall.aspx
</asp:Content>
<p>
<br />
24
Name:-Ravi Singh
Roll No:-26
</asp:GridView>
</p>
<p></p>
<p></p>
<p></p>
<p></p>
</asp:Content>
Showall.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
da.Fill(ds)
cnn.Open()
25
Name:-Ravi Singh
Roll No:-26
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
Registration Table
26
Name:-Ravi Singh
Roll No:-26
Login page
Input:-
Login.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
<br />
27
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
NavigateUrl="~/reg.aspx">registration</asp:HyperLink>
<br />
<br />
</div>
</form>
</body>
</html>
Login.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
28
Name:-Ravi Singh
Roll No:-26
str = "select count(*) from reg where username='" & TextBox1.Text & "' and pass='" &
TextBox2.Text & "' "
cnn.Open()
str1 = cmd.ExecuteScalar
cnn.Close()
Response.Redirect("show.aspx")
Else
End If
End Sub
End Class
Output:-
Registration page
29
Name:-Ravi Singh
Roll No:-26
Input:-
Registration.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
30
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</form>
31
Name:-Ravi Singh
Roll No:-26
</body>
</html>
Registration.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
MsgBox("registration complete")
Response.Redirect("login.aspx")
End If
End Sub
End Class
Output:-
32
Name:-Ravi Singh
Roll No:-26
Master page
Input:-
Home.master
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</asp:ContentPlaceHolder>
<style type="text/css">
.style1 {
width: 1000px;
.style2
33
Name:-Ravi Singh
Roll No:-26
width: 212px;
</style>
</head>
<body>
<div>
<tr>
<td>
<h1 align="center"
Shopping Management</h1></td>
</tr>
<tr>
<td>
<tr>
Font-Underline="False">Add Product</asp:HyperLink>
</td>
Font-Underline="False">Update Product</asp:HyperLink>
</td>
34
Name:-Ravi Singh
Roll No:-26
Font-Underline="False">Delete Product</asp:HyperLink>
</td>
Font-Underline="False">Search Product</asp:HyperLink>
</td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="style1">
<tr>
<td class="style2">
<br />
Font-Underline="False">Add Product</asp:HyperLink>
<br />
<br />
<br />
<br />
Font-Underline="False">Update Product</asp:HyperLink>
35
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
<br />
Font-Underline="False">Delete Product</asp:HyperLink>
<br />
<br />
<br />
<br />
Font-Underline="False">Search Product</asp:HyperLink>
<br />
<br />
<br />
<br />
</td>
<td>
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
<tr>
36
Name:-Ravi Singh
Roll No:-26
<td>
<p align="right"
</p></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Output:-
37
Name:-Ravi Singh
Roll No:-26
Input:-
Add.aspx
</asp:Content>
38
Name:-Ravi Singh
Roll No:-26
<asp:ListItem>Clothes</asp:ListItem>
<asp:ListItem>electronic</asp:ListItem>
<asp:ListItem>food</asp:ListItem>
</asp:DropDownList>
<br />
</asp:Content>
add.aspx.vb
Imports System.Data.SqlClient
Inherits System.Web.UI.Page
39
Name:-Ravi Singh
Roll No:-26
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
MsgBox("Product added")
Response.Redirect("show.aspx")
End If
End Sub
End Sub
End Class
Output:-
40
Name:-Ravi Singh
Roll No:-26
Input:-
Update.aspx
41
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<asp:Label ID="Label6" runat="server" Text="Categories"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" Height="88px" Width="688px">
<asp:ListItem>Clothes</asp:ListItem>
<asp:ListItem>electronic</asp:ListItem>
<asp:ListItem>food</asp:ListItem>
</asp:DropDownList>
<br />
<br />
<asp:Button ID="Button1" runat="server" BackColor="#99FF99" Height="44px"
Text="Update" Width="568px" />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [pro]"></asp:SqlDataSource>
<br />
</asp:Content>
Update.aspx.vb
Imports System.Data.SqlClient
Partial Class update
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select pid from pro"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
While dr.Read
DropDownList2.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "update pro set name='" & TextBox2.Text & "',price='" & TextBox3.Text & "',qnty='" & TextBox4.Text &
"',pdesc='" & TextBox5.Text & "',categ='" & DropDownList1.SelectedValue & "'where pid='" &
DropDownList2.SelectedValue & "'"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
If str1 = True Then
MsgBox("Product Update succesfully")
Response.Redirect("show.aspx")
End If
End Sub
End Class
Output:-
42
Name:-Ravi Singh
Roll No:-26
Input:-
Delete.aspx
43
Name:-Ravi Singh
Roll No:-26
</p>
<p>
<asp:Button ID="Button1" runat="server" BackColor="#66FF99" Height="52px"
Text="Delete" Width="308px" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
</p>
<p>
</p>
</asp:Content>
Delete.aspx.vb
Imports System.Data.SqlClient
Partial Class delete
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select name from pro"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "delete from pro where name='" & DropDownList1.SelectedValue & "'"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
If str1 = True Then
MsgBox("Product delete succesfully")
Response.Redirect("show.aspx")
End If
End Sub
End Class
Output:-
44
Name:-Ravi Singh
Roll No:-26
Input:-
Search.aspx
45
Name:-Ravi Singh
Roll No:-26
Search.aspx.vb
Imports System.Data.SqlClient
Partial Class search
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
46
Name:-Ravi Singh
Roll No:-26
Input:-
Show.aspx
Imports System.Data.SqlClient
Partial Class show
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
47
Name:-Ravi Singh
Roll No:-26
End Sub
End Class
Output:-
Registration table
Product table
48
Name:-Ravi Singh
Roll No:-26
Login page
Input:-
Login.aspx
49
Name:-Ravi Singh
Roll No:-26
Login.aspx.vb
Imports System.Data.SqlClient
Partial Class login
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "select count(*) from reg where username='" & TextBox1.Text & "' and pass='" & TextBox2.Text & "' "
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteScalar
cnn.Close()
If str1 > 0 Then
Response.Redirect("show.aspx")
Else
MsgBox("data not found")
End If
End Sub
End Class
Output:-
Registration page
50
Name:-Ravi Singh
Roll No:-26
Input:-
Registration.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Registration.aspx.vb
Imports System.Data.SqlClient
Partial Class reg
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
51
Name:-Ravi Singh
Roll No:-26
Master page
Input:-
Home.master
52
Name:-Ravi Singh
Roll No:-26
height: 26px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table align="center" class="style1">
<tr>
<td>
<h1 align="center"
style="background-color: #3399FF; font-family: "Times New Roman", Times, serif">
Collage Management</h1></td>
</tr>
<tr>
<td>
<table align="center" class="style1" bgcolor="#FF9933">
<tr>
<td align="center" width="159" class="style3">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/add.aspx"
Font-Underline="False" ForeColor="Black">Add Collage</asp:HyperLink>
</td>
<td align="center" width="159" class="style3">
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/update.aspx"
Font-Underline="False" ForeColor="Black">Update Collage</asp:HyperLink>
</td>
<td align="center" width="159" class="style3">
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/delete.aspx"
Font-Underline="False" ForeColor="Black">Delete Collage</asp:HyperLink>
</td>
<td align="center" width="159" class="style3">
<asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/search.aspx"
Font-Underline="False" ForeColor="Black">Search Collage</asp:HyperLink>
</td>
<td align="center" width="159" class="style3">
<asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/show.aspx"
Font-Underline="False" ForeColor="Black">Show All Collage</asp:HyperLink>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="style1">
<tr>
<td class="style2">
<br />
<asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/add.aspx"
Font-Underline="False">Add Collage</asp:HyperLink>
<br />
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/update.aspx"
Font-Underline="False">Update Collage</asp:HyperLink>
<br />
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/delete.aspx"
Font-Underline="False">Delete Collage</asp:HyperLink>
<br />
53
Name:-Ravi Singh
Roll No:-26
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/search.aspx"
Font-Underline="False">Search Collage</asp:HyperLink>
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl="~/show.aspx"
Font-Underline="False">Show All Collage</asp:HyperLink>
<br />
</td>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<p align="right"
style="background-color: #3399FF; font-family: Arial, Helvetica, sans-serif; font-size: large">
© Copyrights © 2022 – 2023 collage.
</p></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Output:-
54
Name:-Ravi Singh
Roll No:-26
Input:-
Add.aspx
55
Name:-Ravi Singh
Roll No:-26
Imports System.Data.SqlClient
Partial Class add
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "insert into clg(cid,name,address,contact)values('" & TextBox1.Text & "','" & TextBox2.Text & "','" &
TextBox3.Text & "','" & TextBox4.Text & "')"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
If str1 = True Then
MsgBox("Collage added ")
Response.Redirect("show.aspx")
End If
End Sub
End Class
Output:-
56
Name:-Ravi Singh
Roll No:-26
Input:-
Update.aspx
Imports System.Data.SqlClient
Partial Class update
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select cid from clg"
Dim cmd As New SqlCommand(str, cnn)
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
57
Name:-Ravi Singh
Roll No:-26
Input:-
Delete.aspx
58
Name:-Ravi Singh
Roll No:-26
Imports System.Data.SqlClient
Partial Class delete
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select name from clg"
Dim cmd As New SqlCommand(str, cnn)
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "delete from clg where name='" & DropDownList1.SelectedValue & "'"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
If str1 = True Then
MsgBox("collage details delete succesfully")
Response.Redirect("show.aspx")
End If
End Sub
End Class
Output:-
59
Name:-Ravi Singh
Roll No:-26
Input:-
Search.aspx
60
Name:-Ravi Singh
Roll No:-26
Imports System.Data.SqlClient
Partial Class search
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "select * from clg where name='" & TextBox1.Text & "'"
Dim cmd As New SqlCommand(str, cnn)
Dim da As New SqlDataAdapter(cmd)
cnn.Open()
Dim ds As New Data.DataSet
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
61
Name:-Ravi Singh
Roll No:-26
Input:-
Show.aspx
Imports System.Data.SqlClient
Partial Class show
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
62
Name:-Ravi Singh
Roll No:-26
63
Name:-Ravi Singh
Roll No:-26
Login page
Input:-
Login.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
64
Name:-Ravi Singh
Roll No:-26
</div>
</form>
</body>
</html>
Login.aspx.vb
Imports System.Data.SqlClient
Partial Class login
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Registration page
65
Name:-Ravi Singh
Roll No:-26
Input:-
Registration.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
66
Name:-Ravi Singh
Roll No:-26
</div>
</form>
</body>
</html>
Registration.aspx.vb
Imports System.Data.SqlClient
Partial Class reg
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "insert into reg(username,pass,name,age,phone)values('" & TextBox1.Text & "','" & TextBox2.Text & "','"
& TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "')"
Dim cmd As New SqlCommand(str, cnn)
cnn.Open()
str1 = cmd.ExecuteNonQuery
cnn.Close()
If str1 = True Then
MsgBox("registration complete")
Response.Redirect("login.aspx")
End If
End Sub
End Class
Output:-
67
Name:-Ravi Singh
Roll No:-26
Master page
Input:-
Home.master
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1 {
width: 1000px;
}
.style2
{
width: 212px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table align="center" class="style1">
<tr>
<td>
<h1 align="center"
style="background-color: #3399FF; font-family: "Times New Roman", Times, serif">
Movies Ticket Management</h1></td>
</tr>
<tr>
<td>
<table align="center" class="style1">
68
Name:-Ravi Singh
Roll No:-26
<tr>
<td align="center" width="159">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/add.aspx"
Font-Underline="False">Add Movie Ticket</asp:HyperLink>
</td>
<td align="center" width="159">
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/update.aspx"
Font-Underline="False">Update Movie Ticket</asp:HyperLink>
</td>
<td align="center" width="159">
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/delete.aspx"
Font-Underline="False">Delete Movie Ticket</asp:HyperLink>
</td>
<td align="center" width="159">
<asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/search.aspx"
Font-Underline="False">Search Movie Ticket</asp:HyperLink>
</td>
<td align="center" width="159">
<asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/show.aspx"
Font-Underline="False">Show All Movie Ticket</asp:HyperLink>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="style1">
<tr>
<td class="style2" bgcolor="#FF9999">
<asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/add.aspx"
Font-Underline="False" ForeColor="Black">Add Movie Ticket</asp:HyperLink>
<br />
<br />
<br />
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/update.aspx"
Font-Underline="False" ForeColor="Black">Update Movie Ticket</asp:HyperLink>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/delete.aspx"
Font-Underline="False" ForeColor="Black">Delete Movie Ticket</asp:HyperLink>
<br />
<br />
<br />
<br />
<br />
<br />
<asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="~/search.aspx"
Font-Underline="False" ForeColor="Black">Search Movie Ticket</asp:HyperLink>
<br />
<br />
<br />
<br />
<br />
69
Name:-Ravi Singh
Roll No:-26
70
Name:-Ravi Singh
Roll No:-26
Input:-
Add.aspx
71
Name:-Ravi Singh
Roll No:-26
Add.aspx.vb
Imports System.Data.SqlClient
Partial Class add
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
72
Name:-Ravi Singh
Roll No:-26
MsgBox("movie added")
Response.Redirect("show.aspx")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class
Output:-
73
Name:-Ravi Singh
Roll No:-26
Input:-
Update.aspx
74
Name:-Ravi Singh
Roll No:-26
Update.aspx.vb
Imports System.Data.SqlClient
Partial Class update
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select mid from movie"
Dim cmd As New SqlCommand(str, cnn)
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
75
Name:-Ravi Singh
Roll No:-26
While dr.Read
DropDownList3.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
76
Name:-Ravi Singh
Roll No:-26
Input:-
Delete.aspx
77
Name:-Ravi Singh
Roll No:-26
Delete.aspx.vb
Imports System.Data.SqlClient
Partial Class delete
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
str = "select name from movie"
Dim cmd As New SqlCommand(str, cnn)
Dim dr As SqlDataReader
cnn.Open()
dr = cmd.ExecuteReader
While dr.Read
DropDownList1.Items.Add(dr.Item(0))
End While
cnn.Close()
End Sub
78
Name:-Ravi Singh
Roll No:-26
Input:-
Search.aspx
79
Name:-Ravi Singh
Roll No:-26
Search.aspx.vb
Imports System.Data.SqlClient
Partial Class search
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
str = "select * from movie where name ='" & TextBox1.Text & "'"
Dim cmd As New SqlCommand(str, cnn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
cnn.Open()
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
80
Name:-Ravi Singh
Roll No:-26
Input:-
Show.aspx
81
Name:-Ravi Singh
Roll No:-26
</asp:Content>
Show.aspx.vb
Imports System.Data.SqlClient
Partial Class show
Inherits System.Web.UI.Page
Dim cnn As New SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User
Instance=True")
Dim str, str1 As String
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
cnn.Close()
End Sub
End Class
Output:-
82
Name:-Ravi Singh
Roll No:-26
83