Internet Programming Ii - Wat2117c - 2 PDF
Internet Programming Ii - Wat2117c - 2 PDF
) Software Engineering
Instructions to Candidates:
Page 1 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1
ANSWER ALL QUESTIONS
a) List and briefly describe the two stages of code execution process for any .NET
application. You may use appropriate diagram to support your answer.
(5 marks)
Page 2 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1
QUESTION 2: (25 MARKS)
a) Query string is one of the simplest way to pass some information from one
page to another. Consider the below web form
I. Write the appropriate code such that once the Search button is clicked,
the destination page should open. Note, you should pass the value of
the textbox as part of your query string.
(5 Marks)
II. Provide any two disadvantages and one advantage of using query
string.
(3 Marks)
b) Concurrency control include steps to prevent data corruption. What are the
different approaches to manage concurrency? Briefly explain each of them.
(6 Marks)
c) What does the orientation property do in a menu control?
(1 Marks)
d) A user control is basically a grouping of other existing control, intended as a
reusable component. What are the three important attributes we have to specify
in order to register the user control in a webform?
(3 Marks)
e) Explain the differences between a session cookie and a persistent Cookie.
Write code to support your answer.
(4 Marks)
f) What is theme in ASP.NET? Differentiate between a page theme and a global
theme? (3 Marks)
Page 3 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1
QUESTION 3: (25 MARKS)
d) Explain the purpose of AdRotator Control? List any four properties associated
with the AdRotator Control.
(5 marks)
e) Outline three types of templates supported by the Repeater control.
(3 Marks)
Page 4 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1
QUESTION 4: (25 MARKS)
(d) Provide two reasons, why ConnectionString is usually stored in the web.config
file.
(2 Marks)
(e) What is SQL Injection attack? Explain how we can prevent this kind of attack.
(3 Marks)
(f) In an Ecommerce website, a page is required, such that any user will be able to
reset his/her password. Which basically means that we will have to update a
particular user’s password.
For example, below is a screenshot of an existing user John (Currently logged
in), who want to change his password. Once he click on the “Save new
password” button, the application should update his new password in the
database.
Note, in the above webform, the user_id for john is already set in a variable
called “UserId”. The below code were used:
Int UserId = Convert.ToInt32(session(“user_id”))
Page 5 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1
By using the below information
ConnectionString (already present in web.config): ConnStr
Password textbox: txtPassword
User_id is stored in the UserId variable
Table_name: userTbl
Write an asp.net program that allows the user to change his/her password specified
in the “txtPassword” by using the “UserId” variable (stores the user_id whose
password need to be changed).
(10 Marks)
Below are some records example that are currently present in the database
(tableName: “usertbl”):
User_id fName UserName Password
1 John john123 Wint3r@
2 Smith Smith124 Summ3r$
Page 6 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/June 2019 Sem 1