Internet Programming Ii - Wat2117c - 3 PDF
Internet Programming Ii - Wat2117c - 3 PDF
Instructions to Candidates:
Page 1 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
ANSWER ALL QUESTIONS
Page 2 of 6
INTERNET PROGRAMMING II (WAT2117C) SITE/2018/2019 Sem 1
QUESTION 2: (25 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)
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