Internet Application Development
Lab 09

Registration No: 03-3-1-044-2022
Full Name: Nida Pervaiz
Dated: Tuesday, 15th April 2025


Problem 1: Display Selected Options Using CheckBoxList in ASP.NET

Develop an asp.net page that displays a list of options with check boxes (Use CheckBoxList web control).

On clicking a button (web control) the page displays the selected options in a label control.

Sample User Interaction

Solution) Write code behind below.


Problem 2: Generate Dynamic Table with Optional Borders and Images in ASP.NET

Develop a page that displays two text boxes and a button web control. The textboxes are used to capture number of rows and number of columns from user.

(a) On clicking button, generate a table with r rows and c columns. In each cell display row,col values.

(b) Optionally add features of border and image in each cell.

Following figure shows a table with 5 rows and 3 columns.

Solution)

Code behind (Pseudo code)

Page Load Event Handler (Pseudo code)

(i) Configure the table's appearance. This could also be performed in the .aspx file, or in the cmdCreate_Click event handler.

cmdCreate Click Event Handler (Pseudo code)

(i) Clear table.

(ii) Iteratively create a new TableRow object.

(iii) Put the TableRow in the Table.

(iv) Iteratively create a new TableCell object.

(v) Create a new Label object. Display row, col numbers on label.

(vi) Add label and image in cell.

(vii) Optionally adjusted border style and width

(viii)Put the TableCell in the TableRow.

Write code behind below.