Вы находитесь на странице: 1из 6

BSc (Hons.

) Software Engineering

BSc (Hons.) Computer Science with


Network Security
Cohorts BSE/16A/FT & BCNS/16A/FT

Examinations for 2017 / Semester 1


Resit Examinations for BCNS/14B/FT, BCNS/15B/FT,
BCNS/13/FT, BSE/14B/FT, BSE/15B/FT, BCNS/12/FT
& BIS/14B/FT

MODULE: INTERNET PROGRAMMING II


MODULE CODE: WAT2117C

Duration: 2 Hours 30 Minutes

Reading time: 15 Minutes

Instructions to Candidates:

1. Answer ALL questions


2. Questions may be answered in any order but you must indicate
clearly the question number.
3. Start your answer to each question on a fresh page.
4. All questions carry equal marks [25].
5. Total Marks = 100.

This question paper contains 4 questions and 6 pages.

Page 1 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1
ANSWER ALL QUESTIONS

QUESTION 1: (25 MARKS)

(a) Using appropriate diagram, explain how the code compilation and execution
process occurs for any .NET application?
(6 marks)
(b) Describe the term Namespace as used in the .NET Framework.
(3 Marks)
(c)
I. Explain the purpose of AdRotator Control?
(1 Marks)
II. Illustrate how XML is used to implement AdRotator control. List any
three elements present in XML file.
(4 Marks)
(d) State any two advantages and two disadvantages of developing a Multitier
Web Application?
(4 Marks)
(e) List and explain any 3 navigation techniques in ASP.NET.
(6 Marks)
(f) What is the usage of the "EnableViewState" property?
(1 Mark)

Page 2 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1
QUESTION 2: (25 MARKS)

A new firm in the banking sector has decided to introduce a new deposit scheme,
where the user has to specify the monthly investment amount and the number of
years.
The interest rate depends on the number of years as shown in the below table.
Year Interest Rate (%)
Less than 5 Years 8
Between 5 and 10 Years 10
More than 10 Years 12
Table 2.0
You have been asked to write a small ASP.NET application with the following design

(a) Write the code for the above design using appropriate server control
including the validation control.
I. Monthly Investment, is a Mandatory field and the user should only be
able to enter a digit between 200 and 5000.
(5 Marks)
II. Number of years, there should be only one Item in the combo box, i.e. the
initial value “Select Year”. Ensure that the user does not select the Initial
Value.
(4 Marks)
III. Annual Interest rate, is read only field, i.e. the user should not be able to
enter anything since this field will be populate dynamically in part (c) III.
(2 Marks)
IV. Payable amount, a label control is used with an initial value of 0.00
(2 Marks)

Page 3 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1
(b) Using a for or while loop, write the VB code to populate the number of year’s
dropdown list dynamically when the page is loading, thus adding digits
between 1 and 25 in that control.
(3 marks)
(c) Write the VB code to calculate the Total payable amount depending on the
Monthly investment and the number of years the user has chosen. Below is
the detailed requirement:
I. Assuming that AutoPostBack property is set to true, state the event that
will be triggered when a value will be selected from the dropdown List.
(1 Mark)
II. How would you convert the value that the user selected from the
Dropdown list to an integer value?
(2 Mark)
III. Write the necessary code that will populate the “Interest Rate” textbox.
When a user choose any item from the drop down list, the textbox should
be populated as per the table (2.0) above.
(3 Mark)
IV. Using the formulae below, write the VB code that will calculate the
payable amount when the “Calculate” button is clicked. The answer is
displayed in the Payable amount Label.

(2 marks)
V. When we click the clear button, form validation still happens. Which
property in a button control can prevent the validation to be triggered?
(1 marks)

Page 4 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1
QUESTION 3: (25 MARKS)

(a) List the three aspects of Error Handling in ASP.NET.


(3 Marks)
(b) Using the Global.asax file, write a program to track the number of active
sessions in a web application.
(6 Marks)
(c) Master pages allow you to create a consistent look for all the pages in your
web application.
I. Explain how do you attach an existing page to a Master page?
(1 Mark)
II. How a content page does differs from a Master page?
(3 marks)
III. List any other two advantages of using a Master page.
(2 Marks)

(d) Themes are a collection of .css, .skin files. What is the difference between
Skins and Css?
(2 Marks)
(e) Session state tracks the state of data for a web page associated with a
specific application user.
I. List one advantage and one disadvantage of using session state?
(2 marks)
II. List and explain any three session storage mechanisms.
(6 marks)

Page 5 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1
QUESTION 4: (25 MARKS)

(a) State two reasons why database files are stored in the App_Data folder.
(2 Marks)
(b) List any five templates of the DataList control?
(5 marks)
(c) What is SQL Injection? And explain how SqlParameter object help to resolve
this kind of attack?
(3 Marks)
(d) Briefly explain the use of DataAdapter object?
(2 marks)
(e) The “Employee” database records data on student details as listed below:

Employee_Id Employee_Name Employee_Salary

1 John Smith 10000

2 Alan Gardner 15000

I. Where is the most appropriate place to store ConnectionStrings? State


two reason for choosing the storage unit.
(3 Marks)

II. Using the sqlParameter object and the information provided below where
necessary, write an ASP.NET program that add a new record to the
“tblEmployee” table.
Table Name “tblEmployee”
Connection string name from above storage unit “connStr”
Employee_Id is the Primary Key and it is set to auto number
Employee_Name comes from the textbox: txt_name
Employee_Salary comes from the textbox: txt_salary

(10 marks)

***END OF QUESTION PAPER***

Page 6 of 6
Internet Programming II (WAT2117C) SITE/June 2017 Sem 1

Вам также может понравиться