Worksheet 1 - Introduction to ASP.NET

baasopchoppyΑσφάλεια

5 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

77 εμφανίσεις

WORK
SHEET


Institute of Informati
on and Communications Technology

Worksheet
1

-

Introduction to ASP.NET

-

[Subject]

Page |
1

of
3

BTEC

H
IGHER
N
ATIONAL
D
IPLOMA

201
1
/201
2


W
ORKSHEET

1



I
NTRODUCTION TO
ASP.NET


I
NTRODUCTION

Create a new website and name it

WebsiteDemo

.

The following exercises should be
implemented in this website.

Pages should have the appropriate title.


E
XERCISE
1:

U
SIN
G
L
ABELS AND
T
EXTBOXES


a)

Design the interface of a

Register

page where a user can enter his personal details.
Include the following fields and formats:

i.

Name


Single
-
line textbox.

ii.

Surname


Single
-
line textbox

iii.

Address


Multi
-
line textbox

iv.

Date of Birth


Single
-
line textbox

v.

Username


Single
-
line textbox

vi.

Password


Password textbox

vii.

Confirm Password


Password textbox

viii.

Email address


Single
-
line textbox

b)

Labels

should be associated to the relative textbox
es
.

Give an appropriate identifier to
each component.



WORK
SHEET


Institute of Informati
on and Communications Technology

Worksheet
1

-

Introduction to ASP.NET

-

[Subject]

Page |
2

of
3

E
XERCISE
2:

U
SING
B
UTTONS

a)

Add two
buttons

to the “
Register
” page: A
Submit

button and a
Reset

Button.

On being
clicked, the buttons should do the following tasks:



Submit
: The information entered by the
user is displayed as a summary in a label
at the bottom of the page.



Reset
: The textboxes are cleared.

b)

Set the
Submit

button as the
default button
.

c)

Add a
link button

at the top of the “
Register
” page. On click

display
a new and empty
page

named


Home
”.

d)

Add an
image
-
button

to the “
Home
” page that will forward the user to the “
Register

page on click
.

E
XERCISE
3
:

U
SING
C
HECKBOXES AND
R
ADIO
-
BUTTONS

a)

Add a
checkbox
to the

Register
” page so as to allow the user to give permission for his
data to be shared wit
h others.

b)

On checking the
box, a warning should be displayed about the consequences. If the
button is unchecked again the warning should disappear.

c)

Add a group of

5

radio
-
buttons

representing different age groups. The following should
be represented: belo
w 18, 18


29, 30


49, 50


69, 70+.


d)

Modify the operation of the
Submit

button such that both choices are included in the
summary.

E
XERCISE
4
:

R
ETRIEVING INFORMATIO
N FROM THE PAGE BEFO
RE
.

a)

Modify the operation of the
Submit

button such that when the
button is clicked a new
page “
Registration
Success


is loaded containing
a summary of the information inputted
by the user.



The information from the textboxes should be retrieved using the
FindControl
()

method.



The information from the checkbox and the ra
diobuttons should be retrieved by
setting properties
.



WORK
SHEET


Institute of Informati
on and Communications Technology

Worksheet
1

-

Introduction to ASP.NET

-

[Subject]

Page |
3

of
3

E
XERCISE
5
:

U
SING IMAGES

AND HYPERLINKS
.

a)

Add

an appropriate
image

to the “
RegistratationSuccess
” page.

b)

Using an
Image
-
Map
, add a menu image in the “
RegistrationSuccess
” page. The image
should have
2

hotspots:



Hotspot 1: Adds the date and time to the information summary in the

Registrati
onSuccess
” page;



Hotspot
2
: R
edirect
the user back
to the “
Regist
er
” page.

c)

Add a
hyperlink

at the top of the “
RegistrationSuccess
” page which will redirect the user
to the “
Home
” page.