INF 335 Web Server Technologies Test 2 Fall Semester 2011

baasopchoppySecurity

Nov 5, 2013 (3 years and 11 months ago)

110 views




INF

335


Web Server Technologies


Test

2


Fall

Semester 2011




Answer all questions
.


Time allowed is 7
0 minutes.

Use only a pen


pencils are not allowed.


Look straight ahead at all times. Looking (even glancing) at another student’s
paper will be

regarded as cheating.


All books, bags, etc. must be placed on the floor.



1. No books or notes are allowed.


2. Any talking or other communication to a fellow student will be regarded as cheating.


3. Answer questions in any order, but be sure to number

each question clearly.


4. Write your name and ID number at the top of the first page of the answer sheets.


5. If you need assistance, raise your arm.


6. Untidy work and/or illegible handwriting will be penalized.


7. All writing must be done on the pap
er provided. Use of your own paper will be regarded as
cheating.


8. Rough work should be done at the back of the answer sheets and crossed out. It will be
ignored by me.


9. If you need extra paper, raise your arm.


10. If you finish early, raise your arm

and remain seated.


11. If you leave the room without permission, you will be regarded as having forfeit
ed

the exam.


12. At the end of the exam, remain seated until given permission to leave.


Name


ID No.

A

You may use the blank side
(opposite)
of the question sheet
for your
answers.


For multiple choice questions, you must make it abundantly clear what
yo
ur answer

is.

Otherwise no mark will be given.


For multiple choice questions
, a wrong choice counts as a negative mark



1.
What is a post
-
back event? When is it in
itiated?

How may it be used?
Explain
in detail

and clearly
.


Give some example code to illustrate your explanation


just a code
fragment
.


(4 marks)


Post
-
Back, initiated when page called for the first time and when server
replies that’s when it is initi
ated, postback is set to true.

So, when page is sent to user for second time, already repopulated.


Remembers the states between pages, so if someone fills a long
application, he doesn’t have to repopulate all that data, the data is saved.








2.
Which
of the following namespaces contains classes for directly manipulating
SQL Server databases with ASP.NET?

(
Choose

all that apply.)


a)

System.Data.Odbc


b)

System.Data.OleDb
-
for access


c)

System.Data.SqlClient


d)

System.Data.SqlServer


(2 marks)





READ

ASP.NET#3 XML Slide 25

3.
How do you select a database with a SQL Server connection?





(2 marks)




4.
Which of

the following form attributes specifies

that it is
to
be processed by an
ASP.NET script
?

(Choose all that apply.)


a)

action


b)

method



als
o can tell it to process it.


c)

ID



is to access the properties of the textbox


d)

runat=”server”


ASP.NET #2 slide,13,14

(2 marks)



5.
Which of the following properties determines whether a web form has been
already submitted

to the server
?

(Choose a
ll that apply.)


a)

WasSubmitted


b)

FirstSubmit


c)

isSubmit


d)

IsPostBack









(2 marks)



6.
To connect to a SQL Server database, you instantiate an object of the
_____
____


class
.


SQLClient ?? ….ASP.NET#4



(2 marks)



7.
Is it possible to check
that a credit card number is valid in a validation control?
Explain clearly.


-
YES, using RegularExpressionValidation Control, where you can specift the
pattern to validate the number.


ASP.NET#2, Slide 42



http://www.codeproject.com/Articles/2782/Credit
-
Card
-
Validator
-
control
-
for
-
ASP
-
NET


http://www.aspnetworld.com/articles/2008071203.aspx


http://codeasp.net/blogs/vinay_jss/microsoft
-
net/90/credit
-
card
-
validation
-
through
-
regular
-
expression
-
validator
-
in
-
a
spnet


(4 marks)








8.
Suppose a user browses to a ASP.NET webpage, fills in some text boxes, and

clicks a button that fires a server
-
side event. Describe the

sequence of actions
that takes
place on the server.


(4 marks)



1.

Browser fires the event
, re
quest sent from user

2.

Server gets fired events and invokes methods corresponding to the
fired event name

3.

Server executes the method.



9.
What is a master page? What is its purpose?

Explain in detail

and clearly
.


(2 marks)


-
To create the same look, markup

across all webpages.


http://msdn.microsoft.com/en
-
us/library/wtxbf3hh%28v=vs.100%29.aspx


http://w
ww.w3schools.com/aspnet/aspnet_masterpages.asp






10.
What is a list
-
bound control?
E
xplain clearly
.


Give two examples.



ASP.NET#3, Slide 7


-
examples: listbox, gridview…




(2 marks)







11.
What is a data provider? What is its purpose.
E
xplain cle
arly
.


Give an example



ASP.NET#4 !!







(2 marks)

12. In ASP.NET

applications, connections to a database that can remain
physically connected to the tables use

(Choose all that apply)


a)

Append()


b)

OleDbDataAdapters


c)

DataReaders


d)

Generated da
tasets


e)

Query strings


(2 marks)



http://msdn.microsoft.com/en
-
us/magazine/cc188717.aspx


ASP.NET#4