IS Theory and Practice /
LAB RECORD-INFS -260/L /
kishore Thekkepushpakam Nambeesan /
Student ID No: 25012245 /

LECTURER-IN - CHARGE

Mr. Kishore Nambeesan

Information Systems Department

University of Nizwa, Sultanate of Oman

University of Nizwa

College of Economics Management and Information Systems

Department of Information Systems

CERITFICATE

Certified that, this is the Bonafide Practical Record Work of Mr/Ms. Kishore Nambeesan ID No: 10025421,, Bachelor of Information Systems Spring-Semester student of College of Economics Management and Information Systems in the subject “IS Theory and Practice(INFS-260/L)” for the Academic year 2013- 2014.

Dr. ArockiaswamyMr. Kishore Nam Nambeesan

HOD – IS DepartmentLecturer –ICB-INFS-280/L

CEMISCEMIS

Examiners

1.

2.

Table of Contents

Task. No: / Title / Page Nos. / Date
1) / ASP Page showing a Button and Changing Colour On Click / 16.09.2014
2) / ASP Page showing a Currency Conversion / 23.09.2014
3) / ASP page for Name Filedand Choice Validation / 30.09.2014
4) / ASP Page for Customer Web form Validation / 14.10.2014
5) / ASP Page for Web registration Process with SQL database. / 12.11.2014
6) / ASP Page for creating Online Phone Book / 09.12.2014
7)
8)
9)
10)
11)

TASK -1:

ASP Page showing a Button and Changing Its Colour Date: 16/09/14

Objective:

This ASP Page showing a Button which will change its Colour

while clicking on it.

Code:

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Default.aspx.vb"Inherits="WebApplication1._Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleWelcome to UNIZWA</title

</head

bodybgcolor="#cc99ff">

formid="form1"runat="server">

div

</div

asp:ButtonID="Button1"runat="server"Text="Click me"style="height: 26px"/>

</form

</body

</html

Script

PartialPublicClass _Default

Inherits System.Web.UI.Page

ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles Button1.Click

Button1.Style("background-color") = "#0000ff"

Button1.Style("color") = "#ffffff"

Button1.Style("width") = "200px"

Button1.Style("cursor") = "pointer"

Button1.Style("font-family") = "verdana"

Button1.Style("font-weight") = "bold"

Button1.Style("font-size") = "14pt"

Button1.Text = "You clicked me!"

MsgBox("Thank you!")

EndSub

EndClass

Output –Screenshots

TASK -2:

ASP Page showing a Currency Conversion Date: 23/09/14

Objective:

This ASP Page will do the required currency conversion from One Currency to Another.

Code:

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Default.aspx.vb"Inherits="ASP_CurrencyConverter._Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleUntitled Page</title

styletype="text/css">

#Result

{

font-weight: 700;

}

.style1

{

color: #0000FF;

}

.style2

{

color: #FF0066;

}

</style

</head

body

formid="form1"runat="server"title="Welcome to Online Currency Converter ">

asp:LabelID="Label1"runat="server"ForeColor="#000099"

style="font-weight: 700; text-decoration: underline"

Text="Welcome to Online Currency Converter"</asp:Label

br/>

br/>

bspanclass="style2">Convert :</span

asp:TextBoxID="US"runat="server"Font-Bold="True"ForeColor="Blue"

Width="222px"</asp:TextBox

&nbsp;spanclass="style1">US Dollars</span to :&nbsp;

asp:DropDownListID="Currency"runat="server">

asp:ListItemValue="0.85">Euros</asp:ListItem

asp:ListItemValue="110.33">Japanese Yen</asp:ListItem

asp:ListItemValue="1.2">Canadian Dollars</asp:ListItem

</asp:DropDownList

br/>

br/>

asp:ButtonID="Convert"runat="server"ForeColor="Maroon"

style="font-weight: 700; color: #660033;"Text="Click to CONVERT"

BackColor="Aqua"/>

hrstyle="color: #800000"/>

</b

divid="Result"

style="border-style: double; background-color: #99CCFF; font-family: 'Arial Black'; font-size: large; font-weight: 700; font-style: oblique; text-align: center; color: #660033;"

runat="Server">

</div

</form

</body

</html

Script

PartialPublicClass _Default

Inherits System.Web.UI.Page

ProtectedSub Convert_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles Convert.Click

Dim oldAmount AsDouble = Val(US.Text)

' Retrieve the selected ListItem object by its index number.

Dim item As ListItem = Currency.Items(Currency.SelectedIndex)

Dim newAmount AsDouble = oldAmount * Val(item.Value)

Result.InnerText = oldAmount.ToString() & " U.S. dollars = "

Result.InnerText &= newAmount.ToString() & " " & item.Text

EndSub

EndClass

Output –Screenshots

Task-3: ASP page for Name Filed and Choice ValidationDate: 30.09.2014

Objective:

This ASP Page will do the validation for the Name Field and the Card Type selection using the RequiredField Validator and Validation Control.

Code:

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Default.aspx.vb"Inherits="ASP_FieldValidation_Task3._Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleUntitled Page</title

styletype="text/css">

.style1

{

width: 100%;

margin-right: 0px;

background-color: #99CCFF;

}

.style2

{

width: 531px;

}

.style3

{

}

.style4

{

width: 114px;

font-weight: bold;

color: #000000;

}

.style5

{

width: 114px;

font-weight: bold;

color: #000000;

height: 93px;

}

.style6

{

width: 531px;

height: 93px;

}

.style7

{

width: 148px;

height: 93px;

}

.style8

{

color: #000000;

}

.style9

{

height: 10px;

}

</style

</head

body

formid="form1"runat="server">

divstyle="width: 563px">

tableclass="style1">

tr

tdclass="style4">

Name:

</td

tdclass="style2"colspan="2">

asp:TextBoxID="txtname"runat="server"BackColor="#FF99CC"

BorderColor="#0066FF"Width="198px"</asp:TextBox

spanclass="style8">

asp:RequiredFieldValidatorID="rf1"runat="server"ControlToValidate="txtname"

ErrorMessage="Your Name Missing (*)"style="font-weight: 700; font-size: large">*</asp:RequiredFieldValidator

</span

</td

</tr

tr

tdclass="style5">

Card Type:</td

tdclass="style7">

asp:RadioButtonListID="cardtype"runat="server"

style="font-weight: 700; color: #000000; background-color: #99CCFF">

asp:ListItemDiners</asp:ListItem

asp:ListItemMasterCard</asp:ListItem

asp:ListItemVisa</asp:ListItem

</asp:RadioButtonList

</td

tdclass="style6">

asp:RequiredFieldValidatorID="rf2"runat="server"

ControlToValidate="cardtype"ErrorMessage="Card Type not Selected (*)"InitialValue=""

style="font-weight: 700; font-size: large">*</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style3">

&nbsp;</td

tdclass="style2"colspan="2">

asp:ButtonID="submit"runat="server"

style="font-weight: 700; color: #660066; background-color: #66FFFF"

Text="Submit"/>

</td

</tr

tr

tdclass="style9"colspan="3">

hrstyle="background-color: #800000"/>

</td

</tr

tr

tdclass="style3"colspan="3">

asp:ValidationSummaryID="ValidationSummary1"runat="server"

HeaderText="You must enter a value in the following fields:"

style="font-weight: 700; font-style: italic"/>

</td

</tr

</table

</div

</form

</body

</html

Output

Task-4: ASP Page for Customer Web form ValidationDate: 14.10.2014

Objective:

This ASP Page will do the validation for the Name Field and the Card Type selection using

Different Field Validators and Validation Controls.

Code:

DHTML Code

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Default.aspx.vb"Inherits="ASP_TASK4_WebformValidation._Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleUntitled Page</title

styletype="text/css">

.style1

{

text-align: center;

font-size: x-large;

}

.style2

{

font-size: medium;

text-align: right;

}

.style3

{

color: #CC0000;

text-decoration: underline;

}

.style4

{

width: 101%;

margin-left: 0px;

}

.style5

{

height: 28px;

}

.style6

{

width: 134px;

height: 22px;

font-weight: bold;

font-size: medium;

text-align: right;

}

.style7

{

height: 22px;

text-align: left;

}

.style8

{

width: 134px;

font-weight: bold;

font-size: medium;

text-align: right;

}

.style9

{

width: 188px;

}

.style10

{

height: 22px;

width: 188px;

font-size: medium;

text-align: right;

}

.style11

{

}

.style12

{

height: 28px;

text-align: right;

font-size: medium;

}

.style13

{

width: 134px;

font-weight: bold;

font-size: medium;

text-align: right;

height: 26px;

}

.style14

{

width: 188px;

height: 26px;

font-size: medium;

text-align: right;

}

.style15

{

height: 26px;

text-align: left;

font-size: medium;

}

.style16

{

text-align: left;

}

.style17

{

width: 188px;

font-size: medium;

text-align: right;

}

.style18

{

font-size: medium;

text-align: left;

}

</style

</head

bodybgcolor="#ff99ff">

formid="form1"runat="server">

divclass="style1"style="font-weight: 700; margin-left: 40px; width: 694px;">

tableclass="style4">

tr

tdcolspan="3"style="text-align: center">

spanclass="style3">Welcome to Snap Garden</span</td

</tr

tr

tdclass="style8">

User Name:&nbsp;&nbsp;</td

tdclass="style9">

spanclass="style2">

asp:TextBoxID="txtname"runat="server"Width="205px"</asp:TextBox

</span

</td

tdclass="style18">

asp:RequiredFieldValidatorID="rfuname"runat="server"

ErrorMessage="You must enter a user name."ControlToValidate="txtname"</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style8">

Password:&nbsp;&nbsp;&nbsp;</td

tdclass="style17">

asp:TextBoxID="txtpwd"runat="server"Width="205px"TextMode="Password"</asp:TextBox

</td

tdclass="style18">

asp:RequiredFieldValidatorID="rfpwd"runat="server"

ErrorMessage="You must enter a password."ControlToValidate="txtpwd"</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style13">

Retype Password:&nbsp;&nbsp;&nbsp;</td

tdclass="style14">

asp:TextBoxID="txtrtpwd"runat="server"Width="205px"TextMode="Password"</asp:TextBox

</td

tdclass="style15">

&nbsp;asp:CompareValidatorID="cvrtpwd"runat="server"ControlToCompare="txtpwd"

ControlToValidate="txtrtpwd"ErrorMessage="Your password does not match."</asp:CompareValidator

</td

</tr

tr

tdclass="style8">

Your E-mail ID:&nbsp;</td

tdclass="style17">

asp:TextBoxID="txtemail"runat="server"Width="205px"</asp:TextBox

</td

tdclass="style16">

asp:RegularExpressionValidatorID="revemail"runat="server"

ControlToValidate="txtemail"ErrorMessage="This is not a Valid E-mail ID"

style="font-size: medium"ValidationExpression="\S+@\S+\.\S+"</asp:RegularExpressionValidator

</td

</tr

tr

tdclass="style8">

Age:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td

tdclass="style17">

asp:TextBoxID="txtage"runat="server"Width="205px"</asp:TextBox

</tdtdclass="style16">

asp:RangeValidatorID="rvage"runat="server"ControlToValidate="txtage"

ErrorMessage="Age must be between 1 and 120"MaximumValue="120"

MinimumValue="1"SetFocusOnError="True"style="font-size: medium"

Type="Integer"</asp:RangeValidator </td

</tr

tr

tdclass="style6">

GSM:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td

tdclass="style10">

asp:TextBoxID="txtgsm"runat="server"Width="205px"</asp:TextBox

</td

tdclass="style7">

asp:RegularExpressionValidatorID="revgsm"runat="server"

ControlToValidate="txtgsm"ErrorMessage="This is not a Valid GSM No."

style="font-size: medium"ValidationExpression="9\d\d\d\d\d\d\d"</asp:RegularExpressionValidator

</td

</tr

tr

tdclass="style12"colspan="2">

asp:ButtonID="submit"runat="server"

style="font-weight: 700; color: #FFFF66; background-color: #000000; text-align: right;"

Text="Submit"/>

</td

tdclass="style5">

spanclass="style2">

asp:ButtonID="cancel"runat="server"

style="font-weight: 700; color: #FFFF00; background-color: #000000"

Text="Cancel"CausesValidation="False"/>

</span </td </tr

tr

tdclass="style11"colspan="3">

spanclass="style2">

asp:LabelID="status"runat="server"

style="color: #000066; font-size: large; font-style: italic; font-family: 'Comic Sans MS'"

Text="status"</asp:Label

</span

</td </tr </table

br/>

</div

</form

</body

</html

Script

PartialPublicClass _Default

Inherits System.Web.UI.Page

ProtectedSub submit_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles submit.Click

If Page.IsValid Then

status.Text = "This is a valid form."

EndIf

EndSub

ProtectedSub cancel_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles cancel.Click

status.Text = "No attempt was made to validate this form."

EndSub

EndClass

Output

Task-4: ASP Page for Web registration Process with SQL database.Date: 12.11.2014

Objective:

This ASP Page will register will register the User Login Details with the SQL database. After the Successful Registration It will display the Login Details registered with DB.

Code:

DHTML Code

Registartion.aspx.

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Registration.aspx.vb"Inherits="ASP_TASK_5_WebLoginwithDB._Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleUntitled Page</title

styletype="text/css">

.style1

{

text-align: center;

}

.style2

{

width: 69%;

background-color: #99CCFF;

}

.style3

{

text-align: right;

}

.style4

{

width: 265px;

text-align: right;

height: 23px;

}

.style5

{

height: 23px;

text-align: left;

}

#Reset1

{

width: 65px;

text-align: left;

font-weight: 700;

background-color: #00CC99;

}

.style6

{

text-align: left;

}

.style7

{

}

.style8

{

height: 23px;

text-align: left;

width: 248px;

}

.style9

{

text-align: left;

width: 248px;

}

#resetbtn

{

font-weight: 700;

color: #000066;

width: 102px;

background-color: #00FF99;

}

.style11

{

text-align: center;

width: 249px;

}

.style12

{

text-align: center;

text-decoration: underline;

color: #FF0066;

}

.style13

{

text-align: right;

height: 26px;

}

.style14

{

text-align: left;

width: 248px;

height: 26px;

}

.style15

{

text-align: left;

height: 26px;

}

</style

</head

body

formid="form1"runat="server">

divclass="style1"style="font-weight: 700">

tableclass="style2">

tr

tdclass="style3">

&nbsp;</td

tdclass="style12"colspan="2">

Web Login Authentication</td

tdstyle="text-align: left">

&nbsp;</td

</tr

tr

tdclass="style3">

Username</td

tdclass="style7"colspan="2"style="text-align: left">

asp:TextBoxID="txtuser"runat="server"Width="246px"MaxLength="25"</asp:TextBox

</td

tdstyle="text-align: left">

asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"

ControlToValidate="txtuser"ErrorMessage="User Name Missing"</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style4">

E-mail</td

tdclass="style8"colspan="2">

asp:TextBoxID="txtemail"runat="server"Width="246px"</asp:TextBox

</td

tdclass="style5">

asp:RegularExpressionValidatorID="RegularExpressionValidator1"runat="server"

ControlToValidate="txtemail"ErrorMessage="Invalid E-mail address"

ValidationExpression="\S+@\S+\.\S+"</asp:RegularExpressionValidator

</td

</tr

tr

tdclass="style3">

Password</td

tdclass="style9"colspan="2">

asp:TextBoxID="txtpswd"runat="server"TextMode="Password"Width="246px"</asp:TextBox

</td

tdclass="style6">

asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"

ControlToValidate="txtpswd"ErrorMessage="Password missing"</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style13">

Retype Password</td

tdclass="style14"colspan="2">

asp:TextBoxID="txtrtpaswd"runat="server"TextMode="Password"Width="246px"</asp:TextBox

</td

tdclass="style15">

asp:CompareValidatorID="CompareValidator1"runat="server"

ControlToCompare="txtpswd"ControlToValidate="txtrtpaswd"

ErrorMessage="Password Do not Match, Please retype"</asp:CompareValidator

</td

</tr

tr

tdclass="style3">

Select Your Country</td

tdclass="style7"colspan="2"style="text-align: left">

asp:DropDownListID="drpl"runat="server"

style="text-align: left; color: #0000FF; font-weight: 700; font-family: 'Times New Roman',Times,serif; background-color: #FFFFCC"

Width="245px">

asp:ListItemSelect Your Country</asp:ListItem

asp:ListItemOman</asp:ListItem

asp:ListItemUAE</asp:ListItem

asp:ListItemQatar</asp:ListItem

asp:ListItemBahrain</asp:ListItem

asp:ListItemKuwait</asp:ListItem

asp:ListItemIndia</asp:ListItem

asp:ListItemUK</asp:ListItem

asp:ListItemUSA</asp:ListItem

asp:ListItemFrance</asp:ListItem

asp:ListItemGermany</asp:ListItem

asp:ListItemItaly</asp:ListItem

asp:ListItemTurkey</asp:ListItem

asp:ListItem</asp:ListItem

</asp:DropDownList

</td

tdstyle="text-align: left">

asp:RequiredFieldValidatorID="RequiredFieldValidator3"runat="server"

ControlToValidate="drpl"ErrorMessage="Country not Selected"</asp:RequiredFieldValidator

</td

</tr

tr

tdclass="style3"colspan="2">

&nbsp;</td

tdclass="style11">

asp:ButtonID="Registerbtn"runat="server"

style="font-weight: 700; color: #000066; background-color: #FF99FF"

Text="Register"Width="112px"/>

&nbsp;asp:ButtonID="Reset"runat="server"

style="font-weight: 700; color: #000099; background-color: #00FF99"

Text="Reset"Width="112px"/>

&nbsp;</td

tdclass="style3">

&nbsp;</td

</tr

tr

tdclass="style3"colspan="2">

&nbsp;</td

tdclass="style11">

asp:Label

ID="lblstatus"runat="server"

style="color: #0000FF; font-size: large; font-family: Andalus; font-style: italic; background-color: #00FF00;"</asp:Label

</td

</tr

</table

</div

</form

</body

</html

Registartion.aspx.vb (VB Script)

Imports System.Data.SqlClient

Imports System.Configuration

PartialPublicClass _Default

Inherits System.Web.UI.Page

ProtectedSub Registerbtn_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles Registerbtn.Click

Dim connectionString AsString

Dim connection As SqlConnection

Dim chkuser AsString

Dim temp AsInteger

connectionString = ConfigurationManager.ConnectionStrings("RegistartionConnectionString").ToString

connection = New SqlConnection(connectionString)

connection.Open()

chkuser = "Select count (*)from UserData where UserName='" + txtuser.Text + "'"

Dim Com AsNew System.Data.SqlClient.SqlCommand(chkuser, connection)

temp = Convert.ToInt32(Com.ExecuteScalar().ToString)

If temp >= 1 Then

'Response.Write("UserName Already exists")

lblstatus.Text = "UserName: " + txtuser.Text + " Already exists" txtuser.Text = ""

txtemail.Text = ""

txtpswd.Text = ""

txtrtpaswd.Text = ""

drpl.SelectedIndex = 0

connection.Close()

Else

Try

Dim conString AsString

Dim Conn As SqlConnection

Dim InsertQuery AsString

Session("userName") = txtuser.Text

conString = ConfigurationManager.ConnectionStrings("RegistartionConnectionString").ToString

Conn = New SqlConnection(conString)

Conn.Open()

InsertQuery = "Insert into UserData (UserName, email, password,country) values (@Uname,@Email,@Password,@Country)"

Dim Comd AsNew System.Data.SqlClient.SqlCommand(InsertQuery, Conn)

Comd.Parameters.AddWithValue("@Uname", txtuser.Text)

Comd.Parameters.AddWithValue("@Email", txtemail.Text)

Comd.Parameters.AddWithValue("@Password", txtrtpaswd.Text)

Comd.Parameters.AddWithValue("@Country", drpl.SelectedItem.ToString)

Comd.ExecuteNonQuery()

Response.Redirect("Manager.aspx")

Conn.Close()

Catch ex As Exception

Response.Write("Error:" + ex.ToString)

EndTry

EndIf

EndSub

ProtectedSub Reset_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles Reset.Click

txtuser.Text = ""

txtemail.Text = ""

txtpswd.Text = ""

txtrtpaswd.Text = ""

drpl.SelectedIndex = 0

EndSub

EndClass

Manager.aspx

<%@PageLanguage="vb"AutoEventWireup="false"CodeBehind="Manager.aspx.vb"Inherits="ASP_TASK_5_WebLoginwithDB.Manager"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titleUntitled Page</title

styletype="text/css">

.style1

{

font-weight: bold;

color: #660033;

height: 444px;

direction: ltr;

}

.style2

{

color: #10A30C;

}

.style3

{

color: #FF3399;

}

</style

</head

body

formid="form1"runat="server">

divclass="style1">

spanclass="style3">Welcome.....</span

asp:Label

ID="lbluser"runat="server"

style="color: #3333FF; font-size: large; font-family: Andalus; font-style: italic"

Text="UserName"</asp:Label

br/>

spanclass="style2"<% Response.Write("Your Login details are successfully Registered.")%</span

br/>

Admin Page- User Login Details:br/>

asp:GridViewID="GridView1"runat="server"AllowPaging="True"

AllowSorting="True"AutoGenerateColumns="False"BackColor="White"

BorderColor="#999999"BorderStyle="None"BorderWidth="1px"CellPadding="3"

DataSourceID="SqlDataSourceRegistration"GridLines="Vertical"Width="891px"

Height="488px">

RowStyleBackColor="#EEEEEE"ForeColor="Black"/>

Columns

asp:CommandFieldShowSelectButton="True"/>

asp:BoundFieldDataField="ID"HeaderText="ID"SortExpression="ID"/>

asp:BoundFieldDataField="UserName"HeaderText="UserName"

SortExpression="UserName"/>

asp:BoundFieldDataField="email"HeaderText="email"SortExpression="email"/>

asp:BoundFieldDataField="password"HeaderText="password"

SortExpression="password"/>

asp:BoundFieldDataField="country"HeaderText="country"

SortExpression="country"/>

</Columns

FooterStyleBackColor="#CCCCCC"ForeColor="Black"/>

PagerStyleBackColor="#999999"ForeColor="Black"HorizontalAlign="Center"/>

SelectedRowStyleBackColor="#008A8C"Font-Bold="True"ForeColor="White"/>

HeaderStyleBackColor="#000084"Font-Bold="True"ForeColor="White"/>

AlternatingRowStyleBackColor="#DCDCDC"/>

</asp:GridView

asp:SqlDataSourceID="SqlDataSourceRegistration"runat="server"

ConnectionString="<%$ ConnectionStrings:RegistartionConnectionString %>"

SelectCommand="SELECT * FROM [UserData]"</asp:SqlDataSourcebr/>

</div

</form

</body

</html

Manager.aspx.vb

PublicPartialClass Manager

Inherits System.Web.UI.Page

ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load

Dim userName AsString = Session("userName")

lbluser.Text = userName + " !"

EndSub

EndClass

Output

Task-4: ASP Page for creating Online Phone Bookwith MS Access database.Date: 09.12.2014

Objective:

This ASP Page will register Phone book details such as First Name, Last, Name, Mobile No, Landline No, E-mail with MS Access DB.

Code:

Default.aspx

<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="Default.aspx.vb"Inherits="_Default"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""

htmlxmlns="

headrunat="server">

titlePhoneBook</title

linkhref="StyleSheet.css"rel="stylesheet"type="text/css"/>

styletype="text/css">

.style1

{

color: #FF0066;

}

</style

</head

body

formid="form1"runat="server">

div

&nbsp;asp:LabelID="Label6"runat="server"CssClass="title">UNIZWA Online PhoneBook</asp:Labelbr/>

asp:LabelID="Label7"runat="server"CssClass="subtitle">A Phone Book Web

Application for using ASP.Net</asp:Labelbr/>

hr/>

br/>

asp:GridViewID="grvContacts"runat="server"AllowPaging="True"AllowSorting="True"

AutoGenerateColumns="False"AutoGenerateDeleteButton="True"AutoGenerateEditButton="True"BackColor="White"BorderColor="#999999"BorderStyle="None"

BorderWidth="1px"CellPadding="3"DataKeyNames="ID"GridLines="Vertical"OnRowEditing="RowEditing"OnRowDeleting="RowDeleting"OnPageIndexChanging="PageIndexChanging"Width="919px"EmptyDataText="No PhoneBook records found. ">

FooterStyleBackColor="#CCCCCC"ForeColor="Black"/>