Reference no: EM133591
Question 1
(a) Using a diagram, illustrate the basic process in an ASP.NET Architecture involving at least five objects.
(b) Give four benefits of using Web Controls rather than HTML Controls.
(c) Explain the following built-in functions and illustrate each using simple examples. Specify all possible parameters where required.
(i) Len()
(ii) InStr().
(d) Using appropriate ASP.NET validator controls, write extract codes to validate the following form fields as described:
(i) email field must not be empty
(ii) Credit card number field must contain exactly 16 numbers
(iii) DOB field must contain a valid date type.
Note: Include appropriate error messages.
Question 2
(a) List five benefits of using Business Components in an ASP.NET application.
(b) Describe how the Global Application File differs from the Web.config file.
(c) Outline three ways how to use ViewState in a Web Form.
(d) Explain how the AdRotator control works. Illustrate your answer using extract codes.
Question 3
(a) The Repeater control uses templates to control formatting. Give the five types of templates supported by the Repeater control.
(b) You can enable cookieless sessions by modifying the sessionState element in the web configuration file. List and explain four possible values for the cookieless attribute as used in the sessionState element.
(c) (i) Which potential problems may arise when you change items stored in an Application State object?
(ii) What should you do to prevent this?
(d) Write extract codes to demonstrate how you can achieve the following:
(i) set a persistent cookie from the value entered in the "txtUsername" TextBox control
(ii) retrieve the cookie value
(iii) delete the cookie.
Question 4
(a) What is a ConnectionString? Give a suitable example to illustrate the various part of a ConnectionString.
(b) Distinguish between the following methods as used in ADO.NET:
(i) ExecuteReader()
(ii) ExecuteNonQuery()
(iii) ExecuteScalar()
(c) Give four options that allow you to store Session State Data.
(d) Write an ASP.NET program that allows you to retrieve and display all data from the Employees database table in a GridView control, using the DataSet principles.
Database name: industry.mdf
Table name: tblEmployees
Note: Programmatic approach required here