0% found this document useful (0 votes)
2K views

Internet Programming Ii - Wat2117c - 3 PDF

This document contains an exam question paper for the module "Internet Programming II" with 4 questions and 6 pages. Question 1 has 7 sub-parts asking about directives, code behind, managed vs unmanaged code, IIS, page lifecycle events, ViewState, session state vs application state and global.asax handlers. Question 2 has 6 sub-parts about postback vs autopostback, master pages, themes, file uploading, page-to-page data transfer and error handling. Question 3 asks to code a form with validation and redirect it, explain validation groups and user control registration. Question 4 asks about DataSet vs DataReader, SqlCommand methods, parameterized queries, inserting a record using parameters and concurrency control

Uploaded by

cova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Internet Programming Ii - Wat2117c - 3 PDF

This document contains an exam question paper for the module "Internet Programming II" with 4 questions and 6 pages. Question 1 has 7 sub-parts asking about directives, code behind, managed vs unmanaged code, IIS, page lifecycle events, ViewState, session state vs application state and global.asax handlers. Question 2 has 6 sub-parts about postback vs autopostback, master pages, themes, file uploading, page-to-page data transfer and error handling. Question 3 asks to code a form with validation and redirect it, explain validation groups and user control registration. Question 4 asks about DataSet vs DataReader, SqlCommand methods, parameterized queries, inserting a record using parameters and concurrency control

Uploaded by

cova
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

BSc (Hons.

) Computer Science with


Network Security

BSc (Hons.) Software Engineering


Cohort: BCNS/17B/FT

Examinations for 2018 -2019 / Semester 1


Resit Examinations for BSE/13B/FT, BSE/16B/FT,
BSE/17A/FT, BCNS/14B/FT, BCNS/16A/FT &
BCNS/16B/FT

MODULE: INTERNET PROGRAMMING II


MODULE CODE: WAT2117C

Duration: 2 Hours 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/2018/2019 Sem 1
ANSWER ALL QUESTIONS

QUESTION 1: (25 MARKS)

a) What do you understand by Directives? Provide at least one example to


support your answer.
(2 marks)
b) What are the advantages of the code behind feature?
(2 marks)
c) Explain the difference between Managed and Unmanaged code.
(2 Marks)
d) What is IIS and give any two reasons why it is being used?
(3 Marks)
e) At each stage of the page life cycle, the page raises several events. List the
sequence of Events in a Page execution lifecycle?
(7 Marks)
f) Provide two advantages and two disadvantages of using ViewState in your
website.
(4 Marks)
g) Explain the differences between session state and application state?
(2 marks)
h) List any three event handlers that can be included in the global.asax file?
(3 Marks)

Page 2 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
QUESTION 2: (25 MARKS)

a) Explain the difference between “isPostBack” and “autoPostBack” properties?


(2 Marks)
b) Explain the purposes of using Master Page while designing a website,
explaining how does a content page differ from a master page?
(4 Marks)
c) What is theme in ASP.NET? Explain the three different approach for
applying theme in a website?
(4 Marks)
d) Write an ASP.NET program that allow you to upload a file while clicking on a
button, making sure the below requirements are met:
1. Ensure that the upload control is not blank.
2. The file extension should be either .docx or .doc.
3. The file should be uploaded in the server folder `"~/Images/" and with
the same filename as the user had browse.
(5 Marks)
e) There are several ways to transfer data from one page to another. List and
explain any four methods to achieve this.
(8 Marks)
f) List any two aspects of Error handling in ASP.NET.
(2 Marks)

Page 3 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
QUESTION 3: (25 MARKS)

a) Write the code for the design below using appropriate server control and its
properties. You are also required to validate the web form as specified
below.
1. Payment Type, by default the Credit card should be checked and the
PayPal option is disabled. (3 Marks)
2. Name, this field is a mandatory field (i.e. Blank not allowed) (3 Marks)
3. Card number, should allow only 16 digits (i.e. each digit allowed must
be between “0 – 9”) (3 Marks)
4. Expiration date, the textbox length should be up to 6 characters and the
value should not be greater than 122018 (i.e. MMYYYY which basically
means 12/2018) (3 Marks)
5. Security code, ensure that the data entered is an integer. (2 Marks)
6. Complete payment button. (1 mark)

Important: you will be marked for server controls and validation controls. So
no need to write code for creating <table> or any CSS.

Page 4 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
b) Write the corresponding VB code such that when the button “complete
payment” is clicked, the page is being redirected to “homePage.aspx”.
(3 Marks)
c) Using a suitable example or diagram, explain the usage of “ValidationGroup”
property in a webform and what kind of problem does it solved.
(4 Marks)
d) User Controls are developer created ASP.NET web control. What are the
three important attributes we have to specify in order to register the user
control in a webform?
(3 Marks)

Page 5 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
QUESTION 4: (25 MARKS)

a) Provide at least two differences between DataSet and DataReader?


(4 marks)
b) The SqlCommand object allows you to execute query and send commands to
a database. It has methods that are specialized for different commands. List
and explain each of the three commands?
(6 marks)
c) Explain the purpose of using parameterized query? Your answer should
mention what issue we can prevent when we use the sqlParameter object?
(3 Marks)
d) In an “E-Commerce” website, the table tblUsers holds all the information
about the clients registered to the system. Below is an example of records
stored in the database:
User_id fName UserName Password
1 John john123 Wint3r@
2 Samantha Sam1 Summ3r@

Using the sqlParameter object where necessary and the information provided
below. You are required to write the ASP.NET code to insert a new record to
the tblUsers table.
User_id is being auto-incremented.
fName – data need to be fetch from the txtfName textbox control
Username- data need to be fetch from the txtUserName textbox
control
Password - data need to be fetch from the txtpassword textbox
control
Assuming that a connection string named “conStr” is already defined
in the web config.
(10 Marks)
e) Concurrency control include the steps to prevent data corruption. List any two
approach to manage concurrency?
(2 Marks)
***END OF QUESTION PAPER***

Page 6 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1

You might also like